Reid Spencer | 69ccadd | 2006-12-02 04:23:10 +0000 | [diff] [blame] | 1 | ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 && |
| 2 | ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep rlwin |
Chris Lattner | 1628947 | 2005-10-10 21:21:36 +0000 | [diff] [blame] | 3 | |
| 4 | void %test(ubyte* %P) { |
| 5 | %W = load ubyte* %P |
| 6 | %X = shl ubyte %W, ubyte 1 |
| 7 | %Y = add ubyte %X, 2 |
| 8 | %Z = and ubyte %Y, 254 ; dead and |
| 9 | store ubyte %Z, ubyte* %P |
| 10 | ret void |
| 11 | } |
Chris Lattner | cfdbb7c | 2006-02-27 00:20:23 +0000 | [diff] [blame] | 12 | |
Reid Spencer | eacb702 | 2006-12-31 06:02:00 +0000 | [diff] [blame] | 13 | ushort @zext %test2(ushort @zext %crc) { |
| 14 | ; No and's should be needed for the ushorts here. |
Chris Lattner | cfdbb7c | 2006-02-27 00:20:23 +0000 | [diff] [blame] | 15 | %tmp.1 = shr ushort %crc, ubyte 1 |
| 16 | %tmp.7 = xor ushort %tmp.1, 40961 |
| 17 | ret ushort %tmp.7 |
| 18 | } |
| 19 | |