OLD | NEW |
1 ; 1. Trivial smoke test of compare and branch, with multiple basic | 1 ; 1. Trivial smoke test of compare and branch, with multiple basic |
2 ; blocks. | 2 ; blocks. |
3 ; 2. For a conditional branch on a constant boolean value, make sure | 3 ; 2. For a conditional branch on a constant boolean value, make sure |
4 ; we don't lower to a cmp instructions with an immediate as the first | 4 ; we don't lower to a cmp instructions with an immediate as the first |
5 ; source operand. | 5 ; source operand. |
6 | 6 |
7 ; RUN: %llvm2ice -O2 --verbose inst %s | FileCheck %s | 7 ; RUN: %llvm2ice -O2 --verbose inst %s | FileCheck %s |
8 ; RUN: %llvm2ice -Om1 --verbose inst %s | FileCheck %s | 8 ; RUN: %llvm2ice -Om1 --verbose inst %s | FileCheck %s |
9 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s | 9 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
10 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s | 10 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s |
(...skipping 11 matching lines...) Expand all Loading... |
22 ; CHECK-LABEL: simple_cond_branch | 22 ; CHECK-LABEL: simple_cond_branch |
23 ; CHECK: br i1 %r1, label %Equal, label %Unequal | 23 ; CHECK: br i1 %r1, label %Equal, label %Unequal |
24 ; CHECK: Equal: | 24 ; CHECK: Equal: |
25 ; CHECK: ret i32 %foo | 25 ; CHECK: ret i32 %foo |
26 ; CHECK: Unequal: | 26 ; CHECK: Unequal: |
27 ; CHECK: ret i32 %bar | 27 ; CHECK: ret i32 %bar |
28 } | 28 } |
29 | 29 |
30 define internal i32 @test_br_const() { | 30 define internal i32 @test_br_const() { |
31 __0: | 31 __0: |
32 br i1 1, label %__1, label %__2 | 32 br i1 true, label %__1, label %__2 |
33 __1: | 33 __1: |
34 ret i32 21 | 34 ret i32 21 |
35 __2: | 35 __2: |
36 ret i32 43 | 36 ret i32 43 |
37 } | 37 } |
38 ; CHECK-LABEL: test_br_const | 38 ; CHECK-LABEL: test_br_const |
39 ; CHECK-NOT: cmp {{[0-9]*}}, | 39 ; CHECK-NOT: cmp {{[0-9]*}}, |
40 | 40 |
41 ; ERRORS-NOT: ICE translation error | 41 ; ERRORS-NOT: ICE translation error |
42 ; DUMP-NOT: SZ | 42 ; DUMP-NOT: SZ |
OLD | NEW |