Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame^] | 1 | ; PR957 |
| 2 | ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ |
| 3 | ; RUN: not grep select |
| 4 | |
| 5 | uint %test(uint %tmp) { |
| 6 | cond_false179: ; preds = %cond_true |
| 7 | %tmp181 = seteq uint %tmp, 0 ; <bool> [#uses=1] |
| 8 | br bool %tmp181, label %cond_true182, label %cond_next185 |
| 9 | |
| 10 | cond_true182: ; preds = %cond_false179 |
| 11 | br label %cond_next185 |
| 12 | |
| 13 | cond_next185: ; preds = %cond_true182, %cond_false179 |
| 14 | %d0.3 = phi uint [ div (uint 1, uint 0), %cond_true182 ], [ %tmp, |
| 15 | %cond_false179 ] ; <uint> [#uses=7] |
| 16 | |
| 17 | ret uint %d0.3 |
| 18 | } |
| 19 | |
| 20 | uint %test2(uint %tmp) { |
| 21 | cond_false179: ; preds = %cond_true |
| 22 | %tmp181 = seteq uint %tmp, 0 ; <bool> [#uses=1] |
| 23 | br bool %tmp181, label %cond_true182, label %cond_next185 |
| 24 | |
| 25 | cond_true182: ; preds = %cond_false179 |
| 26 | br label %cond_next185 |
| 27 | |
| 28 | cond_next185: ; preds = %cond_true182, %cond_false179 |
| 29 | %d0.3 = phi uint [ div (uint 1, uint 0), %cond_true182 ], [ %tmp, |
| 30 | %cond_false179 ] ; <uint> [#uses=7] |
| 31 | call uint %test(uint 4) |
| 32 | ret uint %d0.3 |
| 33 | } |
| 34 | |