Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f |
2 | |||||
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 |