Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 ; Simple smoke test of the call instruction. The assembly checks | 1 ; Simple smoke test of the call instruction. The assembly checks |
| 2 ; currently only verify the function labels. | 2 ; currently only verify the function labels. |
|
jvoung (off chromium)
2014/11/04 18:00:55
Hmm, this one doesn't seem to be checking for much
Jim Stichnoth
2014/11/04 18:09:40
Good point. Removing the test.
| |
| 3 | 3 |
| 4 ; RUN: %p2i -i %s --args --verbose inst | FileCheck %s | 4 ; RUN: %p2i -i %s --args --verbose inst | FileCheck %s |
| 5 ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s | |
| 6 ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s | |
| 7 | 5 |
| 8 define i32 @fib(i32 %n) { | 6 define i32 @fib(i32 %n) { |
| 9 ; CHECK: define i32 @fib | 7 ; CHECK: define i32 @fib |
| 10 entry: | 8 entry: |
| 11 %cmp = icmp slt i32 %n, 2 | 9 %cmp = icmp slt i32 %n, 2 |
| 12 br i1 %cmp, label %return, label %if.end | 10 br i1 %cmp, label %return, label %if.end |
| 13 | 11 |
| 14 if.end: ; preds = %entry | 12 if.end: ; preds = %entry |
| 15 %sub = add i32 %n, -1 | 13 %sub = add i32 %n, -1 |
| 16 %call = tail call i32 @fib(i32 %sub) | 14 %call = tail call i32 @fib(i32 %sub) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 if.then: ; preds = %entry, %if.then | 56 if.then: ; preds = %entry, %if.then |
| 59 %n.tr3 = phi i32 [ %call.i, %if.then ], [ %n, %entry ] | 57 %n.tr3 = phi i32 [ %call.i, %if.then ], [ %n, %entry ] |
| 60 %sub = add i32 %n.tr3, -1 | 58 %sub = add i32 %n.tr3, -1 |
| 61 %call.i = tail call i32 @redirect_target(i32 %sub) | 59 %call.i = tail call i32 @redirect_target(i32 %sub) |
| 62 %cmp = icmp sgt i32 %call.i, 0 | 60 %cmp = icmp sgt i32 %call.i, 0 |
| 63 br i1 %cmp, label %if.then, label %if.end | 61 br i1 %cmp, label %if.then, label %if.end |
| 64 | 62 |
| 65 if.end: ; preds = %if.then, %entry | 63 if.end: ; preds = %if.then, %entry |
| 66 ret void | 64 ret void |
| 67 } | 65 } |
| 68 | |
| 69 ; ERRORS-NOT: ICE translation error | |
| 70 ; DUMP-NOT: SZ | |
| OLD | NEW |