blob: eef8f51f7a190bfa86defade3ea7bc37a01e8df9 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwin
2
3define void @test(i8* %P) {
4 %W = load i8* %P
5 %X = shl i8 %W, 1
6 %Y = add i8 %X, 2
7 %Z = and i8 %Y, 254 ; dead and
8 store i8 %Z, i8* %P
9 ret void
10}
11
Reid Spencerf234bed2007-07-19 23:13:04 +000012define i16 @test2(i16 zeroext %crc) zeroext {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000013 ; No and's should be needed for the i16s here.
14 %tmp.1 = lshr i16 %crc, 1
15 %tmp.7 = xor i16 %tmp.1, 40961
16 ret i16 %tmp.7
17}
18