Reid Spencer | 69ccadd | 2006-12-02 04:23:10 +0000 | [diff] [blame] | 1 | ; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep indvar |
Chris Lattner | 46d5bca | 2003-09-12 16:42:16 +0000 | [diff] [blame] | 2 | |
| 3 | int %test() { |
| 4 | br bool true, label %LoopHead, label %LoopHead |
| 5 | |
| 6 | LoopHead: |
Chris Lattner | 4dcd0d1 | 2004-03-16 21:10:15 +0000 | [diff] [blame] | 7 | %A = phi int [7, %0], [7, %0], [%B, %LoopHead] |
Chris Lattner | 46d5bca | 2003-09-12 16:42:16 +0000 | [diff] [blame] | 8 | %B = add int %A, 1 |
| 9 | br bool false, label %LoopHead, label %Out |
| 10 | Out: |
| 11 | ret int %B |
| 12 | } |