Reid Spencer | d7c2c2f | 2006-12-02 20:34:08 +0000 | [diff] [blame] | 1 | ; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f |
Tanya Lattner | e7e3f2e | 2004-11-06 22:07:09 +0000 | [diff] [blame] | 2 | |
Chris Lattner | c642435 | 2002-08-22 20:30:06 +0000 | [diff] [blame] | 3 | ; Dominance relationships is not calculated correctly for unreachable blocks, |
| 4 | ; which causes the verifier to barf on this input. |
| 5 | |
| 6 | int %test(bool %b) { |
| 7 | BB0: ret int 7 ; Loop is unreachable |
| 8 | |
| 9 | Loop: |
| 10 | %B = phi int [%B, %L2], [%B, %Loop] ; PHI has same value always. |
| 11 | br bool %b, label %L2, label %Loop |
| 12 | L2: |
| 13 | br label %Loop |
| 14 | } |
| 15 | |