OLD | NEW |
1 ; This test checks that undef values are represented as zero. | 1 ; This test checks that undef values are represented as zero. |
2 | 2 |
3 ; RUN: %llvm2ice --verbose none %s | FileCheck %s | |
4 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s | |
5 ; RUN: %llvm2ice -mattr=sse4.1 --verbose none %s | FileCheck %s | |
6 ; RUN: %llvm2ice -mattr=sse4.1 -O2 --verbose none %s | FileCheck %s | |
7 ; RUN: %llvm2ice -O2 --verbose none %s \ | 3 ; RUN: %llvm2ice -O2 --verbose none %s \ |
8 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj | 4 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ |
| 5 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s |
9 ; RUN: %llvm2ice -Om1 --verbose none %s \ | 6 ; RUN: %llvm2ice -Om1 --verbose none %s \ |
10 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj | 7 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ |
11 ; RUN: %llvm2ice -mattr=sse4.1 -O2 --verbose none %s \ | 8 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s |
12 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj | 9 ; RUN: %llvm2ice -O2 -mattr=sse4.1 --verbose none %s \ |
13 ; RUN: %llvm2ice -mattr=sse4.1 -Om1 --verbose none %s \ | 10 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ |
14 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj | 11 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s |
| 12 ; RUN: %llvm2ice -Om1 -mattr=sse4.1 --verbose none %s \ |
| 13 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ |
| 14 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s |
15 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s | 15 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
16 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s | 16 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s |
17 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ | 17 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ |
18 ; RUN: | FileCheck --check-prefix=DUMP %s | 18 ; RUN: | FileCheck --check-prefix=DUMP %s |
19 | 19 |
20 define i32 @undef_i32() { | 20 define i32 @undef_i32() { |
21 entry: | 21 entry: |
22 ret i32 undef | 22 ret i32 undef |
23 ; CHECK-LABEL: undef_i32: | 23 ; CHECK-LABEL: undef_i32: |
24 ; CHECK: mov eax, 0 | 24 ; CHECK: mov eax, 0 |
25 } | 25 } |
26 | 26 |
27 define i64 @undef_i64() { | 27 define i64 @undef_i64() { |
28 entry: | 28 entry: |
29 ret i64 undef | 29 ret i64 undef |
30 ; CHECK-LABEL: undef_i64: | 30 ; CHECK-LABEL: undef_i64: |
31 ; CHECK-DAG: mov eax, 0 | 31 ; CHECK-DAG: mov eax, 0 |
32 ; CHECK-DAG: mov edx, 0 | 32 ; CHECK-DAG: mov edx, 0 |
33 ; CHECK: ret | |
34 } | 33 } |
35 | 34 |
36 define float @undef_float() { | 35 define float @undef_float() { |
37 entry: | 36 entry: |
38 ret float undef | 37 ret float undef |
39 ; CHECK-LABEL: undef_float: | 38 ; CHECK-LABEL: undef_float: |
40 ; CHECK: [L$float$ | 39 ; CHECK: fld dword ptr [0] |
41 } | 40 } |
42 | 41 |
43 define <4 x i1> @undef_v4i1() { | 42 define <4 x i1> @undef_v4i1() { |
44 entry: | 43 entry: |
45 ret <4 x i1> undef | 44 ret <4 x i1> undef |
46 ; CHECK-LABEL: undef_v4i1: | 45 ; CHECK-LABEL: undef_v4i1: |
47 ; CHECK: pxor | 46 ; CHECK: pxor |
48 } | 47 } |
49 | 48 |
50 define <8 x i1> @undef_v8i1() { | 49 define <8 x i1> @undef_v8i1() { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 ret <4 x float> %val | 182 ret <4 x float> %val |
184 ; CHECK-LABEL: vector_insertelement_arg1: | 183 ; CHECK-LABEL: vector_insertelement_arg1: |
185 ; CHECK: pxor | 184 ; CHECK: pxor |
186 } | 185 } |
187 | 186 |
188 define <4 x float> @vector_insertelement_arg2(<4 x float> %arg) { | 187 define <4 x float> @vector_insertelement_arg2(<4 x float> %arg) { |
189 entry: | 188 entry: |
190 %val = insertelement <4 x float> %arg, float undef, i32 0 | 189 %val = insertelement <4 x float> %arg, float undef, i32 0 |
191 ret <4 x float> %val | 190 ret <4 x float> %val |
192 ; CHECK-LABEL: vector_insertelement_arg2: | 191 ; CHECK-LABEL: vector_insertelement_arg2: |
193 ; CHECK: [L$float$ | 192 ; CHECK: movss {{.*}}, dword ptr [0] |
194 } | 193 } |
195 | 194 |
196 define float @vector_extractelement_v4f32_index_0() { | 195 define float @vector_extractelement_v4f32_index_0() { |
197 entry: | 196 entry: |
198 %val = extractelement <4 x float> undef, i32 0 | 197 %val = extractelement <4 x float> undef, i32 0 |
199 ret float %val | 198 ret float %val |
200 ; CHECK-LABEL: vector_extractelement_v4f32_index_0: | 199 ; CHECK-LABEL: vector_extractelement_v4f32_index_0: |
201 ; CHECK: pxor | 200 ; CHECK: pxor |
202 } | 201 } |
203 | 202 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 define <4 x float> @vector_select_v4f32_arg2(<4 x i1> %cond, <4 x float> %a) { | 284 define <4 x float> @vector_select_v4f32_arg2(<4 x i1> %cond, <4 x float> %a) { |
286 entry: | 285 entry: |
287 %val = select <4 x i1> %cond, <4 x float> %a, <4 x float> undef | 286 %val = select <4 x i1> %cond, <4 x float> %a, <4 x float> undef |
288 ret <4 x float> %val | 287 ret <4 x float> %val |
289 ; CHECK-LABEL: vector_select_v4f32_arg2: | 288 ; CHECK-LABEL: vector_select_v4f32_arg2: |
290 ; CHECK: pxor | 289 ; CHECK: pxor |
291 } | 290 } |
292 | 291 |
293 ; ERRORS-NOT: ICE translation error | 292 ; ERRORS-NOT: ICE translation error |
294 ; DUMP-NOT: SZ | 293 ; DUMP-NOT: SZ |
OLD | NEW |