aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-23 20:24:16 +0000
committerChris Lattner <sabre@nondot.org>2004-02-23 20:24:16 +0000
commit86171b9203083835a035ed72434ffea701e97f04 (patch)
treeb832e4865025a9efbf5a2acc75e165290ae0ab8a /test
parentcedfd2c78d845336501df3b6eceb430b58783aa4 (diff)
downloadexternal_llvm-86171b9203083835a035ed72434ffea701e97f04.zip
external_llvm-86171b9203083835a035ed72434ffea701e97f04.tar.gz
external_llvm-86171b9203083835a035ed72434ffea701e97f04.tar.bz2
Test for the other way also
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll b/test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll
index 911a73f..97020c5 100644
--- a/test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll
+++ b/test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll
@@ -6,3 +6,10 @@ int %test(int %X) {
%Z = shr int %Y, ubyte 17
ret int %Z
}
+
+int %test2(int %X) {
+ ; Do not fold into shl X, 34, as this uses undefined behavior!
+ %Y = shl int %X, ubyte 17
+ %Z = shl int %Y, ubyte 17
+ ret int %Z
+}