1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-30 15:32:52 +01:00
llvm-mirror/test/Regression/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll
Chris Lattner 39c2703ad4 Test for the other way also
llvm-svn: 11767
2004-02-23 20:24:16 +00:00

16 lines
371 B
LLVM

; 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
}
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
}