New testcase, can be an srl instead of sra
authorChris Lattner <sabre@nondot.org>
Mon, 18 Sep 2006 04:31:18 +0000 (04:31 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 18 Sep 2006 04:31:18 +0000 (04:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30449 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/shift-sra.ll [new file with mode: 0644]

diff --git a/test/Transforms/InstCombine/shift-sra.ll b/test/Transforms/InstCombine/shift-sra.ll
new file mode 100644 (file)
index 0000000..a14dce8
--- /dev/null
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | opt -instcombine -disable-output &&
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'shr int'
+
+int %test0(int %X, ubyte %A) {
+       %Y = shr int %X, ubyte %A  ; can be logical shift.
+       %Z = and int %Y, 1
+       ret int %Z
+}