Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \ |
| 2 | ; RUN: grep {%X.1.lcssa} |
| 3 | ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \ |
| 4 | ; RUN: not grep {%X.1.lcssa1} |
| 5 | |
| 6 | declare bool %c1() |
| 7 | declare bool %c2() |
| 8 | |
| 9 | int %foo() { |
| 10 | entry: |
| 11 | br label %loop_begin |
| 12 | |
| 13 | loop_begin: |
| 14 | br bool true, label %loop_body.1, label %loop_exit2 |
| 15 | |
| 16 | loop_body.1: |
| 17 | %X.1 = add int 0, 1 |
| 18 | %rel.1 = call bool %c1() |
| 19 | br bool %rel.1, label %loop_exit, label %loop_body.2 |
| 20 | |
| 21 | loop_body.2: |
| 22 | %rel.2 = call bool %c2() |
| 23 | br bool %rel.2, label %loop_exit, label %loop_begin |
| 24 | |
| 25 | loop_exit: |
| 26 | ret int %X.1 |
| 27 | |
| 28 | loop_exit2: |
| 29 | ret int 1 |
| 30 | } |