Chris Lattner | 578aa74 | 2003-06-22 20:32:35 +0000 | [diff] [blame] | 1 | ; This test checks to make sure phi nodes are updated properly |
| 2 | ; |
Reid Spencer | 69ccadd | 2006-12-02 04:23:10 +0000 | [diff] [blame] | 3 | ; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate -disable-output |
Chris Lattner | 578aa74 | 2003-06-22 20:32:35 +0000 | [diff] [blame] | 4 | |
| 5 | |
| 6 | |
| 7 | int %test(bool %c, int %X, int %Y) { |
| 8 | br label %L |
| 9 | |
| 10 | L: |
| 11 | %A = add int %X, %Y |
| 12 | br bool %c, label %T, label %F |
| 13 | |
| 14 | F: |
| 15 | br bool %c, label %L, label %T |
| 16 | |
| 17 | T: |
| 18 | %V = phi int [%A, %L], [0, %F] |
| 19 | ret int %V |
| 20 | } |