Reid Spencer | c094836 | 2007-01-16 18:08:22 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as %s -o - | llvm-dis > %t1.ll |
| 2 | ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll |
| 3 | ; RUN: diff %t1.ll %t2.ll |
| 4 | |
| 5 | implementation |
| 6 | |
| 7 | ; Test "stripped" format where nothing is symbolic... this is how the bytecode |
| 8 | ; format looks anyways (except for negative vs positive offsets)... |
| 9 | ; |
| 10 | define void "void"(i39, i39) ; Def %0, %1 |
| 11 | begin |
| 12 | add i39 0, 0 ; Def 2 |
| 13 | sub i39 0, 4 ; Def 3 |
| 14 | br label %1 |
| 15 | |
| 16 | ; <label>:1 ; preds = %1, %0 |
| 17 | add i39 %0, %1 ; Def 4 |
| 18 | sub i39 %4, %3 ; Def 5 |
| 19 | icmp sle i39 %5, %2 ; Def 0 - i1 plane |
| 20 | br i1 %0, label %2, label %1 |
| 21 | |
| 22 | ; <label>:2 ; preds = %1 |
| 23 | add i39 %0, %1 ; Def 6 |
| 24 | sub i39 %4, %3 ; Def 7 |
| 25 | icmp sle i39 %7, %2 ; Def 1 - i1 plane |
| 26 | ret void |
| 27 | end |
| 28 | |
| 29 | ; This function always returns zero |
| 30 | define i39 "zarro"() |
| 31 | begin |
| 32 | Startup: |
| 33 | ret i39 0 |
| 34 | end |