Changes to support making the shift instructions be true BinaryOperators.
[oota-llvm.git] / test / CodeGen / PowerPC / and-elim.ll
1 ; RUN: llvm-as < %s | llc -march=ppc32 &&
2 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwin
3
4 define void @test(i8* %P) {
5         %W = load i8* %P
6         %X = shl i8 %W, 1
7         %Y = add i8 %X, 2
8         %Z = and i8 %Y, 254        ; dead and
9         store i8 %Z, i8* %P
10         ret void
11 }
12
13 define i16 @test2(i16 zext %crc) zext { 
14         ; No and's should be needed for the i16s here.
15         %tmp.1 = lshr i16 %crc, 1
16         %tmp.7 = xor i16 %tmp.1, 40961
17         ret i16 %tmp.7
18 }
19