OLD | NEW |
1 ; RUIN: %llvm2ice %s | FileCheck %s | 1 ; RUIN: %llvm2ice %s | FileCheck %s |
2 ; RUIN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s | 2 ; RUIN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
3 ; RUN: %szdiff --llvm2ice=%llvm2ice %s | FileCheck --check-prefix=DUMP %s | 3 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s |
| 4 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ |
| 5 ; RUN: | FileCheck --check-prefix=DUMP %s |
4 | 6 |
5 define void @testSelect(i32 %a, i32 %b) { | 7 define void @testSelect(i32 %a, i32 %b) { |
6 entry: | 8 entry: |
7 %cmp = icmp slt i32 %a, %b | 9 %cmp = icmp slt i32 %a, %b |
8 %cond = select i1 %cmp, i32 %a, i32 %b | 10 %cond = select i1 %cmp, i32 %a, i32 %b |
9 tail call void @useInt(i32 %cond) | 11 tail call void @useInt(i32 %cond) |
10 %cmp1 = icmp sgt i32 %a, %b | 12 %cmp1 = icmp sgt i32 %a, %b |
11 %cond2 = select i1 %cmp1, i32 10, i32 20 | 13 %cond2 = select i1 %cmp1, i32 10, i32 20 |
12 tail call void @useInt(i32 %cond2) | 14 tail call void @useInt(i32 %cond2) |
13 ret void | 15 ret void |
14 } | 16 } |
15 | 17 |
16 declare void @useInt(i32) | 18 declare void @useInt(i32) |
17 | 19 |
18 ; CHECK: .globl testSelect | 20 ; CHECK: .globl testSelect |
19 ; CHECK: cmp | 21 ; CHECK: cmp |
20 ; CHECK: cmp | 22 ; CHECK: cmp |
21 ; CHECK: call useInt | 23 ; CHECK: call useInt |
22 ; CHECK: cmp | 24 ; CHECK: cmp |
23 ; CHECK: cmp | 25 ; CHECK: cmp |
24 ; CHECK: call useInt | 26 ; CHECK: call useInt |
25 ; CHECK: ret | 27 ; CHECK: ret |
26 | 28 |
27 ; ERRORS-NOT: ICE translation error | 29 ; ERRORS-NOT: ICE translation error |
28 ; DUMP-NOT: SZ | 30 ; DUMP-NOT: SZ |
OLD | NEW |