diff options
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll | 8 |
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 0000000..911a73f --- /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 +} |