llvm/test/CodeGen/PowerPC/and-elim.ll
raw| 1 | ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | not grep rlwin |
| 2 | |
| 3 | define void @test(ptr %P) { |
| 4 | %W = load i8, ptr %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, ptr %P |
| 9 | ret void |
| 10 | } |
| 11 | |
| 12 | define zeroext i16 @test2(i16 zeroext %crc) { |
| 13 | ; 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 |