| OLD | NEW |
| 1 ; RUIN: %llvm2ice -verbose inst %s | FileCheck %s | 1 ; Simple smoke test of the call instruction. The assembly checks |
| 2 ; RUIN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s | 2 ; currently only verify the function labels. |
| 3 |
| 4 ; RUN: %llvm2ice --verbose inst %s | FileCheck %s |
| 5 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
| 3 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s | 6 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s |
| 4 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ | 7 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ |
| 5 ; RUN: | FileCheck --check-prefix=DUMP %s | 8 ; RUN: | FileCheck --check-prefix=DUMP %s |
| 6 | 9 |
| 7 define i32 @fib(i32 %n) { | 10 define i32 @fib(i32 %n) { |
| 8 ; CHECK: define i32 @fib | 11 ; CHECK: define i32 @fib |
| 9 entry: | 12 entry: |
| 10 %cmp = icmp slt i32 %n, 2 | 13 %cmp = icmp slt i32 %n, 2 |
| 11 br i1 %cmp, label %return, label %if.end | 14 br i1 %cmp, label %return, label %if.end |
| 12 | 15 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 42 ; CHECK: define i32 @redirect | 45 ; CHECK: define i32 @redirect |
| 43 entry: | 46 entry: |
| 44 %call = tail call i32 @redirect_target(i32 %n) | 47 %call = tail call i32 @redirect_target(i32 %n) |
| 45 ret i32 %call | 48 ret i32 %call |
| 46 } | 49 } |
| 47 | 50 |
| 48 declare i32 @redirect_target(i32) | 51 declare i32 @redirect_target(i32) |
| 49 | 52 |
| 50 define void @call_void(i32 %n) { | 53 define void @call_void(i32 %n) { |
| 51 ; CHECK: define void @call_void | 54 ; CHECK: define void @call_void |
| 55 |
| 52 entry: | 56 entry: |
| 53 %cmp2 = icmp sgt i32 %n, 0 | 57 %cmp2 = icmp sgt i32 %n, 0 |
| 54 br i1 %cmp2, label %if.then, label %if.end | 58 br i1 %cmp2, label %if.then, label %if.end |
| 55 | 59 |
| 56 if.then: ; preds = %entry, %if.then | 60 if.then: ; preds = %entry, %if.then |
| 57 %n.tr3 = phi i32 [ %call.i, %if.then ], [ %n, %entry ] | 61 %n.tr3 = phi i32 [ %call.i, %if.then ], [ %n, %entry ] |
| 58 %sub = add i32 %n.tr3, -1 | 62 %sub = add i32 %n.tr3, -1 |
| 59 %call.i = tail call i32 @redirect_target(i32 %sub) | 63 %call.i = tail call i32 @redirect_target(i32 %sub) |
| 60 %cmp = icmp sgt i32 %call.i, 0 | 64 %cmp = icmp sgt i32 %call.i, 0 |
| 61 br i1 %cmp, label %if.then, label %if.end | 65 br i1 %cmp, label %if.then, label %if.end |
| 62 | 66 |
| 63 if.end: ; preds = %if.then, %entry | 67 if.end: ; preds = %if.then, %entry |
| 64 ret void | 68 ret void |
| 65 } | 69 } |
| 66 | 70 |
| 67 ; ERRORS-NOT: ICE translation error | 71 ; ERRORS-NOT: ICE translation error |
| 68 ; DUMP-NOT: SZ | 72 ; DUMP-NOT: SZ |
| OLD | NEW |