Nate Begeman | d44d3d5 | 2006-02-17 21:22:08 +0000 | [diff] [blame] | 1 | ; Neither of these functions should contain algebraic right shifts |
| 2 | ; RUN: llvm-as < %s | llc -march=ppc32 | not grep srawi |
| 3 | |
| 4 | int %test1(uint %mode.0.i.0) { |
| 5 | %tmp.79 = cast uint %mode.0.i.0 to int ; <sbyte> [#uses=1] |
| 6 | %tmp.80 = shr int %tmp.79, ubyte 15 ; <int> [#uses=1] |
| 7 | %tmp.81 = and int %tmp.80, 24 ; <int> [#uses=1] |
| 8 | ret int %tmp.81 |
| 9 | } |
| 10 | |
| 11 | int %test2(uint %mode.0.i.0) { |
| 12 | %tmp.79 = cast uint %mode.0.i.0 to int ; <sbyte> [#uses=1] |
| 13 | %tmp.80 = shr int %tmp.79, ubyte 15 ; <int> [#uses=1] |
| 14 | %tmp.81 = shr uint %mode.0.i.0, ubyte 16 |
| 15 | %tmp.82 = cast uint %tmp.81 to int |
| 16 | %tmp.83 = and int %tmp.80, %tmp.82 ; <int> [#uses=1] |
| 17 | ret int %tmp.83 |
| 18 | } |