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