summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/2006-11-10-ashr-miscompile.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/InstCombine/2006-11-10-ashr-miscompile.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/2006-11-10-ashr-miscompile.ll7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/2006-11-10-ashr-miscompile.ll b/llvm/test/Transforms/InstCombine/2006-11-10-ashr-miscompile.ll
new file mode 100644
index 00000000000..1809d3ce917
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/2006-11-10-ashr-miscompile.ll
@@ -0,0 +1,7 @@
+; RUN: llvm-upgrade < %s | llvm-as | 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
+}
OpenPOWER on IntegriCloud