OLD | NEW |
1 ; Tests various aspects of i1 related lowering. | 1 ; Tests various aspects of i1 related lowering. |
2 | 2 |
3 ; RUN: %p2i -i %s -a -O2 --verbose none \ | 3 ; RUN: %p2i -i %s -a -O2 --verbose none \ |
4 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ | 4 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ |
5 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s | 5 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s |
6 ; RUN: %p2i -i %s -a -Om1 --verbose none \ | 6 ; RUN: %p2i -i %s -a -Om1 --verbose none \ |
7 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ | 7 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ |
8 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s | 8 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s |
9 ; RUN: %p2i -i %s -a --verbose none | FileCheck --check-prefix=ERRORS %s | |
10 ; RUN: %p2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s | |
11 | 9 |
12 ; Test that and with true uses immediate 1, not -1. | 10 ; Test that and with true uses immediate 1, not -1. |
13 define internal i32 @testAndTrue(i32 %arg) { | 11 define internal i32 @testAndTrue(i32 %arg) { |
14 entry: | 12 entry: |
15 %arg_i1 = trunc i32 %arg to i1 | 13 %arg_i1 = trunc i32 %arg to i1 |
16 %result_i1 = and i1 %arg_i1, true | 14 %result_i1 = and i1 %arg_i1, true |
17 %result = zext i1 %result_i1 to i32 | 15 %result = zext i1 %result_i1 to i32 |
18 ret i32 %result | 16 ret i32 %result |
19 } | 17 } |
20 ; CHECK-LABEL: testAndTrue | 18 ; CHECK-LABEL: testAndTrue |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 %arg_i1 = fptosi double %arg to i1 | 189 %arg_i1 = fptosi double %arg to i1 |
192 %result = sext i1 %arg_i1 to i32 | 190 %result = sext i1 %arg_i1 to i32 |
193 ret i32 %result | 191 ret i32 %result |
194 } | 192 } |
195 ; CHECK-LABEL: testFptosiDouble | 193 ; CHECK-LABEL: testFptosiDouble |
196 ; CHECK: cvttsd2si | 194 ; CHECK: cvttsd2si |
197 ; CHECK: and {{.*}}, 1 | 195 ; CHECK: and {{.*}}, 1 |
198 ; CHECK: movzx [[REG:.*]], | 196 ; CHECK: movzx [[REG:.*]], |
199 ; CHECK-NEXT: shl [[REG]], 31 | 197 ; CHECK-NEXT: shl [[REG]], 31 |
200 ; CHECK-NEXT: sar [[REG]], 31 | 198 ; CHECK-NEXT: sar [[REG]], 31 |
201 | |
202 ; ERRORS-NOT: ICE translation error | |
203 ; DUMP-NOT: SZ | |
OLD | NEW |