OLD | NEW |
1 ; Test handling of call instructions. | 1 ; Test handling of call instructions. |
2 | 2 |
3 ; REQUIRES: allow_dump | |
4 | |
5 ; RUN: %p2i -i %s --insts | FileCheck %s | 3 ; RUN: %p2i -i %s --insts | FileCheck %s |
6 ; RUN: %if --need=allow_disable_ir_gen --command \ | 4 ; RUN: %if --need=allow_disable_ir_gen --command \ |
7 ; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \ | 5 ; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \ |
8 ; RUN: | %if --need=allow_disable_ir_gen --command \ | 6 ; RUN: | %if --need=allow_disable_ir_gen --command \ |
9 ; RUN: FileCheck --check-prefix=NOIR %s | 7 ; RUN: FileCheck --check-prefix=NOIR %s |
10 | 8 |
11 define i32 @fib(i32 %n) { | 9 define i32 @fib(i32 %n) { |
12 entry: | 10 entry: |
13 %cmp = icmp slt i32 %n, 2 | 11 %cmp = icmp slt i32 %n, 2 |
14 br i1 %cmp, label %return, label %if.end | 12 br i1 %cmp, label %return, label %if.end |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 ; CHECK-NEXT: %n.tr3 = phi i32 [ %call.i, %if.then ], [ %n, %entry ] | 104 ; CHECK-NEXT: %n.tr3 = phi i32 [ %call.i, %if.then ], [ %n, %entry ] |
107 ; CHECK-NEXT: %sub = add i32 %n.tr3, -1 | 105 ; CHECK-NEXT: %sub = add i32 %n.tr3, -1 |
108 ; CHECK-NEXT: %call.i = call i32 @redirect_target(i32 %sub) | 106 ; CHECK-NEXT: %call.i = call i32 @redirect_target(i32 %sub) |
109 ; CHECK-NEXT: %cmp = icmp sgt i32 %call.i, 0 | 107 ; CHECK-NEXT: %cmp = icmp sgt i32 %call.i, 0 |
110 ; CHECK-NEXT: br i1 %cmp, label %if.then, label %if.end | 108 ; CHECK-NEXT: br i1 %cmp, label %if.then, label %if.end |
111 ; CHECK-NEXT: if.end: | 109 ; CHECK-NEXT: if.end: |
112 ; CHECK-NEXT: ret void | 110 ; CHECK-NEXT: ret void |
113 ; CHECK-NEXT: } | 111 ; CHECK-NEXT: } |
114 | 112 |
115 ; NOIR: Total across all functions | 113 ; NOIR: Total across all functions |
OLD | NEW |