Folding or(fcmp,fcmp) only works if the operands of the fcmps are the same fp type.
[oota-llvm.git] / test / Transforms / InstCombine / shift-sra.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
2 ; RUN:    grep {lshr i32} | count 2
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep ashr
4
5 int %test1(int %X, ubyte %A) {
6         %Y = shr int %X, ubyte %A  ; can be logical shift.
7         %Z = and int %Y, 1
8         ret int %Z
9 }
10
11 int %test2(ubyte %tmp) {
12         %tmp3 = cast ubyte %tmp to int
13         %tmp4 = add int %tmp3, 7
14         %tmp5 = ashr int %tmp4, ubyte 3   ; lshr
15         ret int %tmp5
16 }
17