Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame^] | 1 | ; CFG Simplification is making a loop dead, then changing the add into: |
2 | ; | ||||
3 | ; %V1 = add int %V1, 1 | ||||
4 | ; | ||||
5 | ; Which is not valid SSA | ||||
6 | ; | ||||
7 | ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | ||||
8 | |||||
9 | void "test"() { | ||||
10 | br bool true, label %end, label %Loop | ||||
11 | |||||
12 | Loop: | ||||
13 | %V = phi int [0, %0], [%V1, %Loop] | ||||
14 | %V1 = add int %V, 1 | ||||
15 | |||||
16 | br label %Loop | ||||
17 | end: | ||||
18 | ret void | ||||
19 | } |