summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-23 20:19:51 +0000
committerChris Lattner <sabre@nondot.org>2004-02-23 20:19:51 +0000
commitcedfd2c78d845336501df3b6eceb430b58783aa4 (patch)
tree38c278552e3b7579281eebabe114909fc77a031e /test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll
parentcbc20b451d3a3980351c388652ea39314dd09a23 (diff)
downloadllvm-cedfd2c78d845336501df3b6eceb430b58783aa4.tar.gz
llvm-cedfd2c78d845336501df3b6eceb430b58783aa4.tar.bz2
llvm-cedfd2c78d845336501df3b6eceb430b58783aa4.tar.xz
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11766 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll')
-rw-r--r--test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll b/test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll
new file mode 100644
index 0000000000..911a73f57c
--- /dev/null
+++ b/test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 34
+
+int %test(int %X) {
+ ; Do not fold into shr X, 34, as this uses undefined behavior!
+ %Y = shr int %X, ubyte 17
+ %Z = shr int %Y, ubyte 17
+ ret int %Z
+}