1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-- -mattr=+sse2 | FileCheck %s --check-prefix=SSE
3 ; RUN: llc < %s -mtriple=x86_64-- -mattr=+avx | FileCheck %s --check-prefix=AVX
9 define i32 @test_x86_sse_comieq_ss(<4 x float> %a0, <4 x float> %a1, i32 %a2, i32 %a3) {
10 ; SSE-LABEL: test_x86_sse_comieq_ss:
12 ; SSE-NEXT: movl %edi, %eax
13 ; SSE-NEXT: comiss %xmm1, %xmm0
16 ; SSE-NEXT: testb %cl, %dl
17 ; SSE-NEXT: cmovnel %esi, %eax
20 ; AVX-LABEL: test_x86_sse_comieq_ss:
22 ; AVX-NEXT: movl %edi, %eax
23 ; AVX-NEXT: vcomiss %xmm1, %xmm0
26 ; AVX-NEXT: testb %cl, %dl
27 ; AVX-NEXT: cmovnel %esi, %eax
29 %call = call i32 @llvm.x86.sse.comieq.ss(<4 x float> %a0, <4 x float> %a1)
30 %cmp = icmp eq i32 %call, 0
31 %res = select i1 %cmp, i32 %a2, i32 %a3
34 declare i32 @llvm.x86.sse.comieq.ss(<4 x float>, <4 x float>) nounwind readnone
36 define i32 @test_x86_sse_comige_ss(<4 x float> %a0, <4 x float> %a1, i32 %a2, i32 %a3) {
37 ; SSE-LABEL: test_x86_sse_comige_ss:
39 ; SSE-NEXT: movl %edi, %eax
40 ; SSE-NEXT: comiss %xmm1, %xmm0
41 ; SSE-NEXT: cmovbl %esi, %eax
44 ; AVX-LABEL: test_x86_sse_comige_ss:
46 ; AVX-NEXT: movl %edi, %eax
47 ; AVX-NEXT: vcomiss %xmm1, %xmm0
48 ; AVX-NEXT: cmovbl %esi, %eax
50 %call = call i32 @llvm.x86.sse.comige.ss(<4 x float> %a0, <4 x float> %a1)
51 %cmp = icmp ne i32 %call, 0
52 %res = select i1 %cmp, i32 %a2, i32 %a3
55 declare i32 @llvm.x86.sse.comige.ss(<4 x float>, <4 x float>) nounwind readnone
57 define i32 @test_x86_sse_comigt_ss(<4 x float> %a0, <4 x float> %a1, i32 %a2, i32 %a3) {
58 ; SSE-LABEL: test_x86_sse_comigt_ss:
60 ; SSE-NEXT: movl %edi, %eax
61 ; SSE-NEXT: comiss %xmm1, %xmm0
62 ; SSE-NEXT: cmoval %esi, %eax
65 ; AVX-LABEL: test_x86_sse_comigt_ss:
67 ; AVX-NEXT: movl %edi, %eax
68 ; AVX-NEXT: vcomiss %xmm1, %xmm0
69 ; AVX-NEXT: cmoval %esi, %eax
71 %call = call i32 @llvm.x86.sse.comigt.ss(<4 x float> %a0, <4 x float> %a1)
72 %cmp = icmp eq i32 %call, 0
73 %res = select i1 %cmp, i32 %a2, i32 %a3
76 declare i32 @llvm.x86.sse.comigt.ss(<4 x float>, <4 x float>) nounwind readnone
78 define i32 @test_x86_sse_comile_ss(<4 x float> %a0, <4 x float> %a1, i32 %a2, i32 %a3) {
79 ; SSE-LABEL: test_x86_sse_comile_ss:
81 ; SSE-NEXT: movl %edi, %eax
82 ; SSE-NEXT: comiss %xmm0, %xmm1
83 ; SSE-NEXT: cmovbl %esi, %eax
86 ; AVX-LABEL: test_x86_sse_comile_ss:
88 ; AVX-NEXT: movl %edi, %eax
89 ; AVX-NEXT: vcomiss %xmm0, %xmm1
90 ; AVX-NEXT: cmovbl %esi, %eax
92 %call = call i32 @llvm.x86.sse.comile.ss(<4 x float> %a0, <4 x float> %a1)
93 %cmp = icmp ne i32 %call, 0
94 %res = select i1 %cmp, i32 %a2, i32 %a3
97 declare i32 @llvm.x86.sse.comile.ss(<4 x float>, <4 x float>) nounwind readnone
99 define i32 @test_x86_sse_comilt_ss(<4 x float> %a0, <4 x float> %a1, i32 %a2, i32 %a3) {
100 ; SSE-LABEL: test_x86_sse_comilt_ss:
102 ; SSE-NEXT: movl %edi, %eax
103 ; SSE-NEXT: comiss %xmm0, %xmm1
104 ; SSE-NEXT: cmoval %esi, %eax
107 ; AVX-LABEL: test_x86_sse_comilt_ss:
109 ; AVX-NEXT: movl %edi, %eax
110 ; AVX-NEXT: vcomiss %xmm0, %xmm1
111 ; AVX-NEXT: cmoval %esi, %eax
113 %call = call i32 @llvm.x86.sse.comilt.ss(<4 x float> %a0, <4 x float> %a1)
114 %cmp = icmp eq i32 %call, 0
115 %res = select i1 %cmp, i32 %a2, i32 %a3
118 declare i32 @llvm.x86.sse.comilt.ss(<4 x float>, <4 x float>) nounwind readnone
120 define i32 @test_x86_sse_comineq_ss(<4 x float> %a0, <4 x float> %a1, i32 %a2, i32 %a3) {
121 ; SSE-LABEL: test_x86_sse_comineq_ss:
123 ; SSE-NEXT: movl %esi, %eax
124 ; SSE-NEXT: comiss %xmm1, %xmm0
125 ; SSE-NEXT: cmovnel %edi, %eax
126 ; SSE-NEXT: cmovpl %edi, %eax
129 ; AVX-LABEL: test_x86_sse_comineq_ss:
131 ; AVX-NEXT: movl %esi, %eax
132 ; AVX-NEXT: vcomiss %xmm1, %xmm0
133 ; AVX-NEXT: cmovnel %edi, %eax
134 ; AVX-NEXT: cmovpl %edi, %eax
136 %call = call i32 @llvm.x86.sse.comineq.ss(<4 x float> %a0, <4 x float> %a1)
137 %cmp = icmp ne i32 %call, 0
138 %res = select i1 %cmp, i32 %a2, i32 %a3
141 declare i32 @llvm.x86.sse.comineq.ss(<4 x float>, <4 x float>) nounwind readnone
143 define i32 @test_x86_sse_ucomieq_ss(<4 x float> %a0, <4 x float> %a1, i32 %a2, i32 %a3) {
144 ; SSE-LABEL: test_x86_sse_ucomieq_ss:
146 ; SSE-NEXT: movl %edi, %eax
147 ; SSE-NEXT: ucomiss %xmm1, %xmm0
148 ; SSE-NEXT: setnp %cl
150 ; SSE-NEXT: testb %cl, %dl
151 ; SSE-NEXT: cmovnel %esi, %eax
154 ; AVX-LABEL: test_x86_sse_ucomieq_ss:
156 ; AVX-NEXT: movl %edi, %eax
157 ; AVX-NEXT: vucomiss %xmm1, %xmm0
158 ; AVX-NEXT: setnp %cl
160 ; AVX-NEXT: testb %cl, %dl
161 ; AVX-NEXT: cmovnel %esi, %eax
163 %call = call i32 @llvm.x86.sse.ucomieq.ss(<4 x float> %a0, <4 x float> %a1)
164 %cmp = icmp eq i32 %call, 0
165 %res = select i1 %cmp, i32 %a2, i32 %a3
168 declare i32 @llvm.x86.sse.ucomieq.ss(<4 x float>, <4 x float>) nounwind readnone
170 define i32 @test_x86_sse_ucomige_ss(<4 x float> %a0, <4 x float> %a1, i32 %a2, i32 %a3) {
171 ; SSE-LABEL: test_x86_sse_ucomige_ss:
173 ; SSE-NEXT: movl %edi, %eax
174 ; SSE-NEXT: ucomiss %xmm1, %xmm0
175 ; SSE-NEXT: cmovbl %esi, %eax
178 ; AVX-LABEL: test_x86_sse_ucomige_ss:
180 ; AVX-NEXT: movl %edi, %eax
181 ; AVX-NEXT: vucomiss %xmm1, %xmm0
182 ; AVX-NEXT: cmovbl %esi, %eax
184 %call = call i32 @llvm.x86.sse.ucomige.ss(<4 x float> %a0, <4 x float> %a1)
185 %cmp = icmp ne i32 %call, 0
186 %res = select i1 %cmp, i32 %a2, i32 %a3
189 declare i32 @llvm.x86.sse.ucomige.ss(<4 x float>, <4 x float>) nounwind readnone
191 define i32 @test_x86_sse_ucomigt_ss(<4 x float> %a0, <4 x float> %a1, i32 %a2, i32 %a3) {
192 ; SSE-LABEL: test_x86_sse_ucomigt_ss:
194 ; SSE-NEXT: movl %edi, %eax
195 ; SSE-NEXT: ucomiss %xmm1, %xmm0
196 ; SSE-NEXT: cmoval %esi, %eax
199 ; AVX-LABEL: test_x86_sse_ucomigt_ss:
201 ; AVX-NEXT: movl %edi, %eax
202 ; AVX-NEXT: vucomiss %xmm1, %xmm0
203 ; AVX-NEXT: cmoval %esi, %eax
205 %call = call i32 @llvm.x86.sse.ucomigt.ss(<4 x float> %a0, <4 x float> %a1)
206 %cmp = icmp eq i32 %call, 0
207 %res = select i1 %cmp, i32 %a2, i32 %a3
210 declare i32 @llvm.x86.sse.ucomigt.ss(<4 x float>, <4 x float>) nounwind readnone
212 define i32 @test_x86_sse_ucomile_ss(<4 x float> %a0, <4 x float> %a1, i32 %a2, i32 %a3) {
213 ; SSE-LABEL: test_x86_sse_ucomile_ss:
215 ; SSE-NEXT: movl %edi, %eax
216 ; SSE-NEXT: ucomiss %xmm0, %xmm1
217 ; SSE-NEXT: cmovbl %esi, %eax
220 ; AVX-LABEL: test_x86_sse_ucomile_ss:
222 ; AVX-NEXT: movl %edi, %eax
223 ; AVX-NEXT: vucomiss %xmm0, %xmm1
224 ; AVX-NEXT: cmovbl %esi, %eax
226 %call = call i32 @llvm.x86.sse.ucomile.ss(<4 x float> %a0, <4 x float> %a1)
227 %cmp = icmp ne i32 %call, 0
228 %res = select i1 %cmp, i32 %a2, i32 %a3
231 declare i32 @llvm.x86.sse.ucomile.ss(<4 x float>, <4 x float>) nounwind readnone
233 define i32 @test_x86_sse_ucomilt_ss(<4 x float> %a0, <4 x float> %a1, i32 %a2, i32 %a3) {
234 ; SSE-LABEL: test_x86_sse_ucomilt_ss:
236 ; SSE-NEXT: movl %edi, %eax
237 ; SSE-NEXT: ucomiss %xmm0, %xmm1
238 ; SSE-NEXT: cmoval %esi, %eax
241 ; AVX-LABEL: test_x86_sse_ucomilt_ss:
243 ; AVX-NEXT: movl %edi, %eax
244 ; AVX-NEXT: vucomiss %xmm0, %xmm1
245 ; AVX-NEXT: cmoval %esi, %eax
247 %call = call i32 @llvm.x86.sse.ucomilt.ss(<4 x float> %a0, <4 x float> %a1)
248 %cmp = icmp eq i32 %call, 0
249 %res = select i1 %cmp, i32 %a2, i32 %a3
252 declare i32 @llvm.x86.sse.ucomilt.ss(<4 x float>, <4 x float>) nounwind readnone
254 define i32 @test_x86_sse_ucomineq_ss(<4 x float> %a0, <4 x float> %a1, i32 %a2, i32 %a3) {
255 ; SSE-LABEL: test_x86_sse_ucomineq_ss:
257 ; SSE-NEXT: movl %esi, %eax
258 ; SSE-NEXT: ucomiss %xmm1, %xmm0
259 ; SSE-NEXT: cmovnel %edi, %eax
260 ; SSE-NEXT: cmovpl %edi, %eax
263 ; AVX-LABEL: test_x86_sse_ucomineq_ss:
265 ; AVX-NEXT: movl %esi, %eax
266 ; AVX-NEXT: vucomiss %xmm1, %xmm0
267 ; AVX-NEXT: cmovnel %edi, %eax
268 ; AVX-NEXT: cmovpl %edi, %eax
270 %call = call i32 @llvm.x86.sse.ucomineq.ss(<4 x float> %a0, <4 x float> %a1)
271 %cmp = icmp ne i32 %call, 0
272 %res = select i1 %cmp, i32 %a2, i32 %a3
275 declare i32 @llvm.x86.sse.ucomineq.ss(<4 x float>, <4 x float>) nounwind readnone
281 define i32 @test_x86_sse2_comieq_sd(<2 x double> %a0, <2 x double> %a1, i32 %a2, i32 %a3) {
282 ; SSE-LABEL: test_x86_sse2_comieq_sd:
284 ; SSE-NEXT: movl %edi, %eax
285 ; SSE-NEXT: comisd %xmm1, %xmm0
286 ; SSE-NEXT: setnp %cl
288 ; SSE-NEXT: testb %cl, %dl
289 ; SSE-NEXT: cmovnel %esi, %eax
292 ; AVX-LABEL: test_x86_sse2_comieq_sd:
294 ; AVX-NEXT: movl %edi, %eax
295 ; AVX-NEXT: vcomisd %xmm1, %xmm0
296 ; AVX-NEXT: setnp %cl
298 ; AVX-NEXT: testb %cl, %dl
299 ; AVX-NEXT: cmovnel %esi, %eax
301 %call = call i32 @llvm.x86.sse2.comieq.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
302 %cmp = icmp eq i32 %call, 0
303 %res = select i1 %cmp, i32 %a2, i32 %a3
306 declare i32 @llvm.x86.sse2.comieq.sd(<2 x double>, <2 x double>) nounwind readnone
308 define i32 @test_x86_sse2_comige_sd(<2 x double> %a0, <2 x double> %a1, i32 %a2, i32 %a3) {
309 ; SSE-LABEL: test_x86_sse2_comige_sd:
311 ; SSE-NEXT: movl %edi, %eax
312 ; SSE-NEXT: comisd %xmm1, %xmm0
313 ; SSE-NEXT: cmovbl %esi, %eax
316 ; AVX-LABEL: test_x86_sse2_comige_sd:
318 ; AVX-NEXT: movl %edi, %eax
319 ; AVX-NEXT: vcomisd %xmm1, %xmm0
320 ; AVX-NEXT: cmovbl %esi, %eax
322 %call = call i32 @llvm.x86.sse2.comige.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
323 %cmp = icmp ne i32 %call, 0
324 %res = select i1 %cmp, i32 %a2, i32 %a3
327 declare i32 @llvm.x86.sse2.comige.sd(<2 x double>, <2 x double>) nounwind readnone
329 define i32 @test_x86_sse2_comigt_sd(<2 x double> %a0, <2 x double> %a1, i32 %a2, i32 %a3) {
330 ; SSE-LABEL: test_x86_sse2_comigt_sd:
332 ; SSE-NEXT: movl %edi, %eax
333 ; SSE-NEXT: comisd %xmm1, %xmm0
334 ; SSE-NEXT: cmoval %esi, %eax
337 ; AVX-LABEL: test_x86_sse2_comigt_sd:
339 ; AVX-NEXT: movl %edi, %eax
340 ; AVX-NEXT: vcomisd %xmm1, %xmm0
341 ; AVX-NEXT: cmoval %esi, %eax
343 %call = call i32 @llvm.x86.sse2.comigt.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
344 %cmp = icmp eq i32 %call, 0
345 %res = select i1 %cmp, i32 %a2, i32 %a3
348 declare i32 @llvm.x86.sse2.comigt.sd(<2 x double>, <2 x double>) nounwind readnone
350 define i32 @test_x86_sse2_comile_sd(<2 x double> %a0, <2 x double> %a1, i32 %a2, i32 %a3) {
351 ; SSE-LABEL: test_x86_sse2_comile_sd:
353 ; SSE-NEXT: movl %edi, %eax
354 ; SSE-NEXT: comisd %xmm0, %xmm1
355 ; SSE-NEXT: cmovbl %esi, %eax
358 ; AVX-LABEL: test_x86_sse2_comile_sd:
360 ; AVX-NEXT: movl %edi, %eax
361 ; AVX-NEXT: vcomisd %xmm0, %xmm1
362 ; AVX-NEXT: cmovbl %esi, %eax
364 %call = call i32 @llvm.x86.sse2.comile.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
365 %cmp = icmp ne i32 %call, 0
366 %res = select i1 %cmp, i32 %a2, i32 %a3
369 declare i32 @llvm.x86.sse2.comile.sd(<2 x double>, <2 x double>) nounwind readnone
371 define i32 @test_x86_sse2_comilt_sd(<2 x double> %a0, <2 x double> %a1, i32 %a2, i32 %a3) {
372 ; SSE-LABEL: test_x86_sse2_comilt_sd:
374 ; SSE-NEXT: movl %edi, %eax
375 ; SSE-NEXT: comisd %xmm0, %xmm1
376 ; SSE-NEXT: cmoval %esi, %eax
379 ; AVX-LABEL: test_x86_sse2_comilt_sd:
381 ; AVX-NEXT: movl %edi, %eax
382 ; AVX-NEXT: vcomisd %xmm0, %xmm1
383 ; AVX-NEXT: cmoval %esi, %eax
385 %call = call i32 @llvm.x86.sse2.comilt.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
386 %cmp = icmp eq i32 %call, 0
387 %res = select i1 %cmp, i32 %a2, i32 %a3
390 declare i32 @llvm.x86.sse2.comilt.sd(<2 x double>, <2 x double>) nounwind readnone
392 define i32 @test_x86_sse2_comineq_sd(<2 x double> %a0, <2 x double> %a1, i32 %a2, i32 %a3) {
393 ; SSE-LABEL: test_x86_sse2_comineq_sd:
395 ; SSE-NEXT: movl %esi, %eax
396 ; SSE-NEXT: comisd %xmm1, %xmm0
397 ; SSE-NEXT: cmovnel %edi, %eax
398 ; SSE-NEXT: cmovpl %edi, %eax
401 ; AVX-LABEL: test_x86_sse2_comineq_sd:
403 ; AVX-NEXT: movl %esi, %eax
404 ; AVX-NEXT: vcomisd %xmm1, %xmm0
405 ; AVX-NEXT: cmovnel %edi, %eax
406 ; AVX-NEXT: cmovpl %edi, %eax
408 %call = call i32 @llvm.x86.sse2.comineq.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
409 %cmp = icmp ne i32 %call, 0
410 %res = select i1 %cmp, i32 %a2, i32 %a3
413 declare i32 @llvm.x86.sse2.comineq.sd(<2 x double>, <2 x double>) nounwind readnone
415 define i32 @test_x86_sse2_ucomieq_sd(<2 x double> %a0, <2 x double> %a1, i32 %a2, i32 %a3) {
416 ; SSE-LABEL: test_x86_sse2_ucomieq_sd:
418 ; SSE-NEXT: movl %edi, %eax
419 ; SSE-NEXT: ucomisd %xmm1, %xmm0
420 ; SSE-NEXT: setnp %cl
422 ; SSE-NEXT: testb %cl, %dl
423 ; SSE-NEXT: cmovnel %esi, %eax
426 ; AVX-LABEL: test_x86_sse2_ucomieq_sd:
428 ; AVX-NEXT: movl %edi, %eax
429 ; AVX-NEXT: vucomisd %xmm1, %xmm0
430 ; AVX-NEXT: setnp %cl
432 ; AVX-NEXT: testb %cl, %dl
433 ; AVX-NEXT: cmovnel %esi, %eax
435 %call = call i32 @llvm.x86.sse2.ucomieq.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
436 %cmp = icmp eq i32 %call, 0
437 %res = select i1 %cmp, i32 %a2, i32 %a3
440 declare i32 @llvm.x86.sse2.ucomieq.sd(<2 x double>, <2 x double>) nounwind readnone
442 define i32 @test_x86_sse2_ucomige_sd(<2 x double> %a0, <2 x double> %a1, i32 %a2, i32 %a3) {
443 ; SSE-LABEL: test_x86_sse2_ucomige_sd:
445 ; SSE-NEXT: movl %edi, %eax
446 ; SSE-NEXT: ucomisd %xmm1, %xmm0
447 ; SSE-NEXT: cmovbl %esi, %eax
450 ; AVX-LABEL: test_x86_sse2_ucomige_sd:
452 ; AVX-NEXT: movl %edi, %eax
453 ; AVX-NEXT: vucomisd %xmm1, %xmm0
454 ; AVX-NEXT: cmovbl %esi, %eax
456 %call = call i32 @llvm.x86.sse2.ucomige.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
457 %cmp = icmp ne i32 %call, 0
458 %res = select i1 %cmp, i32 %a2, i32 %a3
461 declare i32 @llvm.x86.sse2.ucomige.sd(<2 x double>, <2 x double>) nounwind readnone
463 define i32 @test_x86_sse2_ucomigt_sd(<2 x double> %a0, <2 x double> %a1, i32 %a2, i32 %a3) {
464 ; SSE-LABEL: test_x86_sse2_ucomigt_sd:
466 ; SSE-NEXT: movl %edi, %eax
467 ; SSE-NEXT: ucomisd %xmm1, %xmm0
468 ; SSE-NEXT: cmoval %esi, %eax
471 ; AVX-LABEL: test_x86_sse2_ucomigt_sd:
473 ; AVX-NEXT: movl %edi, %eax
474 ; AVX-NEXT: vucomisd %xmm1, %xmm0
475 ; AVX-NEXT: cmoval %esi, %eax
477 %call = call i32 @llvm.x86.sse2.ucomigt.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
478 %cmp = icmp eq i32 %call, 0
479 %res = select i1 %cmp, i32 %a2, i32 %a3
482 declare i32 @llvm.x86.sse2.ucomigt.sd(<2 x double>, <2 x double>) nounwind readnone
484 define i32 @test_x86_sse2_ucomile_sd(<2 x double> %a0, <2 x double> %a1, i32 %a2, i32 %a3) {
485 ; SSE-LABEL: test_x86_sse2_ucomile_sd:
487 ; SSE-NEXT: movl %edi, %eax
488 ; SSE-NEXT: ucomisd %xmm0, %xmm1
489 ; SSE-NEXT: cmovbl %esi, %eax
492 ; AVX-LABEL: test_x86_sse2_ucomile_sd:
494 ; AVX-NEXT: movl %edi, %eax
495 ; AVX-NEXT: vucomisd %xmm0, %xmm1
496 ; AVX-NEXT: cmovbl %esi, %eax
498 %call = call i32 @llvm.x86.sse2.ucomile.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
499 %cmp = icmp ne i32 %call, 0
500 %res = select i1 %cmp, i32 %a2, i32 %a3
503 declare i32 @llvm.x86.sse2.ucomile.sd(<2 x double>, <2 x double>) nounwind readnone
505 define i32 @test_x86_sse2_ucomilt_sd(<2 x double> %a0, <2 x double> %a1, i32 %a2, i32 %a3) {
506 ; SSE-LABEL: test_x86_sse2_ucomilt_sd:
508 ; SSE-NEXT: movl %edi, %eax
509 ; SSE-NEXT: ucomisd %xmm0, %xmm1
510 ; SSE-NEXT: cmoval %esi, %eax
513 ; AVX-LABEL: test_x86_sse2_ucomilt_sd:
515 ; AVX-NEXT: movl %edi, %eax
516 ; AVX-NEXT: vucomisd %xmm0, %xmm1
517 ; AVX-NEXT: cmoval %esi, %eax
519 %call = call i32 @llvm.x86.sse2.ucomilt.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
520 %cmp = icmp eq i32 %call, 0
521 %res = select i1 %cmp, i32 %a2, i32 %a3
524 declare i32 @llvm.x86.sse2.ucomilt.sd(<2 x double>, <2 x double>) nounwind readnone
526 define i32 @test_x86_sse2_ucomineq_sd(<2 x double> %a0, <2 x double> %a1, i32 %a2, i32 %a3) {
527 ; SSE-LABEL: test_x86_sse2_ucomineq_sd:
529 ; SSE-NEXT: movl %esi, %eax
530 ; SSE-NEXT: ucomisd %xmm1, %xmm0
531 ; SSE-NEXT: cmovnel %edi, %eax
532 ; SSE-NEXT: cmovpl %edi, %eax
535 ; AVX-LABEL: test_x86_sse2_ucomineq_sd:
537 ; AVX-NEXT: movl %esi, %eax
538 ; AVX-NEXT: vucomisd %xmm1, %xmm0
539 ; AVX-NEXT: cmovnel %edi, %eax
540 ; AVX-NEXT: cmovpl %edi, %eax
542 %call = call i32 @llvm.x86.sse2.ucomineq.sd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
543 %cmp = icmp ne i32 %call, 0
544 %res = select i1 %cmp, i32 %a2, i32 %a3
547 declare i32 @llvm.x86.sse2.ucomineq.sd(<2 x double>, <2 x double>) nounwind readnone
549 define void @PR38960_eq(<4 x float> %A, <4 x float> %B) {
550 ; SSE-LABEL: PR38960_eq:
551 ; SSE: # %bb.0: # %entry
552 ; SSE-NEXT: comiss %xmm1, %xmm0
553 ; SSE-NEXT: setnp %al
555 ; SSE-NEXT: testb %al, %cl
556 ; SSE-NEXT: jne foo@PLT # TAILCALL
557 ; SSE-NEXT: # %bb.1: # %if.end
560 ; AVX-LABEL: PR38960_eq:
561 ; AVX: # %bb.0: # %entry
562 ; AVX-NEXT: vcomiss %xmm1, %xmm0
563 ; AVX-NEXT: setnp %al
565 ; AVX-NEXT: testb %al, %cl
566 ; AVX-NEXT: jne foo@PLT # TAILCALL
567 ; AVX-NEXT: # %bb.1: # %if.end
570 %call = tail call i32 @llvm.x86.sse.comieq.ss(<4 x float> %A, <4 x float> %B) #3
571 %cmp = icmp eq i32 %call, 0
572 br i1 %cmp, label %if.end, label %if.then
575 tail call void @foo()
582 define void @PR38960_neq(<4 x float> %A, <4 x float> %B) {
583 ; SSE-LABEL: PR38960_neq:
584 ; SSE: # %bb.0: # %entry
585 ; SSE-NEXT: comiss %xmm1, %xmm0
587 ; SSE-NEXT: setne %cl
588 ; SSE-NEXT: orb %al, %cl
589 ; SSE-NEXT: jne foo@PLT # TAILCALL
590 ; SSE-NEXT: # %bb.1: # %if.end
593 ; AVX-LABEL: PR38960_neq:
594 ; AVX: # %bb.0: # %entry
595 ; AVX-NEXT: vcomiss %xmm1, %xmm0
597 ; AVX-NEXT: setne %cl
598 ; AVX-NEXT: orb %al, %cl
599 ; AVX-NEXT: jne foo@PLT # TAILCALL
600 ; AVX-NEXT: # %bb.1: # %if.end
603 %call = tail call i32 @llvm.x86.sse.comineq.ss(<4 x float> %A, <4 x float> %B) #3
604 %cmp = icmp eq i32 %call, 0
605 br i1 %cmp, label %if.end, label %if.then
608 tail call void @foo()