This testcase is miscompiled by instcombine, reduced from 176.gcc
authorChris Lattner <sabre@nondot.org>
Fri, 10 Nov 2006 23:37:54 +0000 (23:37 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 10 Nov 2006 23:37:54 +0000 (23:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31652 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/2006-11-10-ashr-miscompile.ll [new file with mode: 0644]

diff --git a/test/Transforms/InstCombine/2006-11-10-ashr-miscompile.ll b/test/Transforms/InstCombine/2006-11-10-ashr-miscompile.ll
new file mode 100644 (file)
index 0000000..85c1f91
--- /dev/null
@@ -0,0 +1,7 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep lshr
+; Verify this is not turned into -1.
+
+int %test(ubyte %amt) {
+  %B = lshr int -1, ubyte %amt
+  ret int %B
+}