aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
+}