Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(900)

Side by Side Diff: tests_lit/llvm2ice_tests/undef.ll

Issue 1497033002: Fuse icmp/fcmp with select (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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: %p2i -i %s --filetype=obj --disassemble --args -O2 \ 3 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
4 ; RUN: | FileCheck %s 4 ; RUN: | FileCheck %s
5 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \ 5 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \
6 ; RUN: | FileCheck %s 6 ; RUN: | FileCheck %s
7 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 -mattr=sse4.1 \ 7 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 -mattr=sse4.1 \
8 ; RUN: | FileCheck %s 8 ; RUN: | FileCheck %s
9 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 -mattr=sse4.1 \ 9 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 -mattr=sse4.1 \
10 ; RUN: | FileCheck %s 10 ; RUN: | FileCheck %s
(...skipping 20 matching lines...) Expand all
31 ret i32 %ret 31 ret i32 %ret
32 ; CHECK-LABEL: trunc_undef_i64 32 ; CHECK-LABEL: trunc_undef_i64
33 ; CHECK: mov eax,0x0 33 ; CHECK: mov eax,0x0
34 ; CHECK: ret 34 ; CHECK: ret
35 } 35 }
36 36
37 define internal float @undef_float() { 37 define internal float @undef_float() {
38 entry: 38 entry:
39 ret float undef 39 ret float undef
40 ; CHECK-LABEL: undef_float 40 ; CHECK-LABEL: undef_float
41 ; CHECK: pxor [[REG:xmm.]],[[REG]] 41 ; CHECK: xorps [[REG:xmm.]],[[REG]]
42 ; CHECK: fld 42 ; CHECK: fld
43 } 43 }
44 44
45 define internal double @undef_double() {
46 entry:
47 ret double undef
48 ; CHECK-LABEL: undef_double
49 ; CHECK: xorpd [[REG:xmm.]],[[REG]]
50 ; CHECK: fld
51 }
52
45 define internal <4 x i1> @undef_v4i1() { 53 define internal <4 x i1> @undef_v4i1() {
46 entry: 54 entry:
47 ret <4 x i1> undef 55 ret <4 x i1> undef
48 ; CHECK-LABEL: undef_v4i1 56 ; CHECK-LABEL: undef_v4i1
49 ; CHECK: pxor 57 ; CHECK: pxor
50 } 58 }
51 59
52 define internal <8 x i1> @undef_v8i1() { 60 define internal <8 x i1> @undef_v8i1() {
53 entry: 61 entry:
54 ret <8 x i1> undef 62 ret <8 x i1> undef
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 ret <4 x float> %val 193 ret <4 x float> %val
186 ; CHECK-LABEL: vector_insertelement_arg1 194 ; CHECK-LABEL: vector_insertelement_arg1
187 ; CHECK: pxor 195 ; CHECK: pxor
188 } 196 }
189 197
190 define internal <4 x float> @vector_insertelement_arg2(<4 x float> %arg) { 198 define internal <4 x float> @vector_insertelement_arg2(<4 x float> %arg) {
191 entry: 199 entry:
192 %val = insertelement <4 x float> %arg, float undef, i32 0 200 %val = insertelement <4 x float> %arg, float undef, i32 0
193 ret <4 x float> %val 201 ret <4 x float> %val
194 ; CHECK-LABEL: vector_insertelement_arg2 202 ; CHECK-LABEL: vector_insertelement_arg2
195 ; CHECK: pxor [[REG:xmm.]],[[REG]] 203 ; CHECK: xorps [[REG:xmm.]],[[REG]]
196 ; CHECK: {{movss|insertps}} {{.*}},[[REG]] 204 ; CHECK: {{movss|insertps}} {{.*}},[[REG]]
197 } 205 }
198 206
199 define internal float @vector_extractelement_v4f32_index_0() { 207 define internal float @vector_extractelement_v4f32_index_0() {
200 entry: 208 entry:
201 %val = extractelement <4 x float> undef, i32 0 209 %val = extractelement <4 x float> undef, i32 0
202 ret float %val 210 ret float %val
203 ; CHECK-LABEL: vector_extractelement_v4f32_index_0 211 ; CHECK-LABEL: vector_extractelement_v4f32_index_0
204 ; CHECK: pxor 212 ; CHECK: pxor
205 } 213 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 302 }
295 303
296 define internal <4 x float> @vector_select_v4f32_arg2(<4 x i1> %cond, 304 define internal <4 x float> @vector_select_v4f32_arg2(<4 x i1> %cond,
297 <4 x float> %a) { 305 <4 x float> %a) {
298 entry: 306 entry:
299 %val = select <4 x i1> %cond, <4 x float> %a, <4 x float> undef 307 %val = select <4 x i1> %cond, <4 x float> %a, <4 x float> undef
300 ret <4 x float> %val 308 ret <4 x float> %val
301 ; CHECK-LABEL: vector_select_v4f32_arg2 309 ; CHECK-LABEL: vector_select_v4f32_arg2
302 ; CHECK: pxor 310 ; CHECK: pxor
303 } 311 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698