Jim Laskey | df1530a | 2006-06-13 13:10:44 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | llc -fast |
| 2 | |
| 3 | uint %test1(uint %tmp1) { |
| 4 | %tmp2 = or uint %tmp1, 2147483648 |
| 5 | %tmp3 = shr uint %tmp2, ubyte 31 |
| 6 | %tmp4 = and uint %tmp3, 2147483648 |
| 7 | %tmp5 = seteq uint %tmp4, 0 |
| 8 | br bool %tmp5, label %cond_true, label %cond_false |
| 9 | |
| 10 | cond_true: |
| 11 | ret uint %tmp1 |
| 12 | |
| 13 | cond_false: |
| 14 | |
| 15 | ret uint %tmp2 |
| 16 | } |
| 17 | |
| 18 | |
| 19 | uint %test2(uint %tmp1) { |
| 20 | %tmp2 = or uint %tmp1, 2147483648 |
| 21 | %tmp3 = cast uint %tmp2 to int |
| 22 | %tmp4 = shr int %tmp3, ubyte 31 |
| 23 | %tmp5 = cast int %tmp4 to uint |
| 24 | %tmp6 = and uint %tmp5, 2147483648 |
| 25 | %tmp7 = seteq uint %tmp6, 0 |
| 26 | br bool %tmp7, label %cond_true, label %cond_false |
| 27 | |
| 28 | cond_true: |
| 29 | ret uint %tmp1 |
| 30 | |
| 31 | cond_false: |
| 32 | |
| 33 | ret uint %tmp2 |
| 34 | } |
| 35 | |
| 36 | |
| 37 | uint %test3(uint %tmp1) { |
| 38 | %tmp2 = or uint %tmp1, 1 |
| 39 | %tmp3 = shl uint %tmp2, ubyte 31 |
| 40 | %tmp4 = and uint %tmp3, 1 |
| 41 | %tmp5 = seteq uint %tmp4, 0 |
| 42 | br bool %tmp5, label %cond_true, label %cond_false |
| 43 | |
| 44 | cond_true: |
| 45 | ret uint %tmp1 |
| 46 | |
| 47 | cond_false: |
| 48 | |
| 49 | ret uint %tmp2 |
| 50 | } |