blob: 8f423d8be1ea33ffdbe2d6e5352179a91e02cc4e [file] [log] [blame]
Reid Spencerc33a34f2007-01-05 18:31:56 +00001; RUN: llvm-as < %s | llc -march=ppc32 &&
2; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwin
Chris Lattner16289472005-10-10 21:21:36 +00003
Reid Spencerc33a34f2007-01-05 18:31:56 +00004define void %test(i8* %P) {
5 %W = load i8* %P
6 %X = shl i8 %W, i8 1
7 %Y = add i8 %X, 2
8 %Z = and i8 %Y, 254 ; dead and
9 store i8 %Z, i8* %P
Chris Lattner16289472005-10-10 21:21:36 +000010 ret void
11}
Chris Lattnercfdbb7c2006-02-27 00:20:23 +000012
Reid Spencerc33a34f2007-01-05 18:31:56 +000013define i16 %test2(i16 zext %crc) zext {
14 ; No and's should be needed for the i16s here.
15 %tmp.1 = lshr i16 %crc, i8 1
16 %tmp.7 = xor i16 %tmp.1, 40961
17 ret i16 %tmp.7
Chris Lattnercfdbb7c2006-02-27 00:20:23 +000018}
19