1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+sse2 -O3 | FileCheck %s --check-prefix=SSE-32
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 -O3 | FileCheck %s --check-prefix=SSE-64
4 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx -O3 | FileCheck %s --check-prefix=AVX-32
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx -O3 | FileCheck %s --check-prefix=AVX-64
6 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512f -mattr=+avx512vl -O3 | FileCheck %s --check-prefix=AVX-32
7 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f -mattr=+avx512vl -O3 | FileCheck %s --check-prefix=AVX-64
8 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=-sse -O3 | FileCheck %s --check-prefix=X87
9 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=-sse,+cmov -O3 | FileCheck %s --check-prefix=X87-CMOV
11 define i32 @test_f32_oeq_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
12 ; SSE-32-LABEL: test_f32_oeq_q:
14 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
15 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
16 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
17 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
18 ; SSE-32-NEXT: cmovnel %eax, %ecx
19 ; SSE-32-NEXT: cmovpl %eax, %ecx
20 ; SSE-32-NEXT: movl (%ecx), %eax
23 ; SSE-64-LABEL: test_f32_oeq_q:
25 ; SSE-64-NEXT: movl %edi, %eax
26 ; SSE-64-NEXT: ucomiss %xmm1, %xmm0
27 ; SSE-64-NEXT: cmovnel %esi, %eax
28 ; SSE-64-NEXT: cmovpl %esi, %eax
31 ; AVX-32-LABEL: test_f32_oeq_q:
33 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
34 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
35 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
36 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
37 ; AVX-32-NEXT: cmovnel %eax, %ecx
38 ; AVX-32-NEXT: cmovpl %eax, %ecx
39 ; AVX-32-NEXT: movl (%ecx), %eax
42 ; AVX-64-LABEL: test_f32_oeq_q:
44 ; AVX-64-NEXT: movl %edi, %eax
45 ; AVX-64-NEXT: vucomiss %xmm1, %xmm0
46 ; AVX-64-NEXT: cmovnel %esi, %eax
47 ; AVX-64-NEXT: cmovpl %esi, %eax
50 ; X87-LABEL: test_f32_oeq_q:
52 ; X87-NEXT: flds {{[0-9]+}}(%esp)
53 ; X87-NEXT: flds {{[0-9]+}}(%esp)
56 ; X87-NEXT: fnstsw %ax
57 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
59 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
60 ; X87-NEXT: jne .LBB0_3
62 ; X87-NEXT: jp .LBB0_3
64 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
66 ; X87-NEXT: movl (%eax), %eax
69 ; X87-CMOV-LABEL: test_f32_oeq_q:
71 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
72 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
73 ; X87-CMOV-NEXT: fucompi %st(1), %st
74 ; X87-CMOV-NEXT: fstp %st(0)
76 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
77 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
78 ; X87-CMOV-NEXT: cmovnel %eax, %ecx
79 ; X87-CMOV-NEXT: cmovpl %eax, %ecx
80 ; X87-CMOV-NEXT: movl (%ecx), %eax
82 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
83 float %f1, float %f2, metadata !"oeq",
84 metadata !"fpexcept.strict") #0
85 %res = select i1 %cond, i32 %a, i32 %b
89 define i32 @test_f32_ogt_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
90 ; SSE-32-LABEL: test_f32_ogt_q:
92 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
93 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
94 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
95 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
96 ; SSE-32-NEXT: cmoval %eax, %ecx
97 ; SSE-32-NEXT: movl (%ecx), %eax
100 ; SSE-64-LABEL: test_f32_ogt_q:
102 ; SSE-64-NEXT: movl %edi, %eax
103 ; SSE-64-NEXT: ucomiss %xmm1, %xmm0
104 ; SSE-64-NEXT: cmovbel %esi, %eax
107 ; AVX-32-LABEL: test_f32_ogt_q:
109 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
110 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
111 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
112 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
113 ; AVX-32-NEXT: cmoval %eax, %ecx
114 ; AVX-32-NEXT: movl (%ecx), %eax
117 ; AVX-64-LABEL: test_f32_ogt_q:
119 ; AVX-64-NEXT: movl %edi, %eax
120 ; AVX-64-NEXT: vucomiss %xmm1, %xmm0
121 ; AVX-64-NEXT: cmovbel %esi, %eax
124 ; X87-LABEL: test_f32_ogt_q:
126 ; X87-NEXT: flds {{[0-9]+}}(%esp)
127 ; X87-NEXT: flds {{[0-9]+}}(%esp)
130 ; X87-NEXT: fnstsw %ax
131 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
133 ; X87-NEXT: ja .LBB1_1
135 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
136 ; X87-NEXT: movl (%eax), %eax
139 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
140 ; X87-NEXT: movl (%eax), %eax
143 ; X87-CMOV-LABEL: test_f32_ogt_q:
145 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
146 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
147 ; X87-CMOV-NEXT: fucompi %st(1), %st
148 ; X87-CMOV-NEXT: fstp %st(0)
149 ; X87-CMOV-NEXT: wait
150 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
151 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
152 ; X87-CMOV-NEXT: cmoval %eax, %ecx
153 ; X87-CMOV-NEXT: movl (%ecx), %eax
154 ; X87-CMOV-NEXT: retl
155 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
156 float %f1, float %f2, metadata !"ogt",
157 metadata !"fpexcept.strict") #0
158 %res = select i1 %cond, i32 %a, i32 %b
162 define i32 @test_f32_oge_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
163 ; SSE-32-LABEL: test_f32_oge_q:
165 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
166 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
167 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
168 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
169 ; SSE-32-NEXT: cmovael %eax, %ecx
170 ; SSE-32-NEXT: movl (%ecx), %eax
173 ; SSE-64-LABEL: test_f32_oge_q:
175 ; SSE-64-NEXT: movl %edi, %eax
176 ; SSE-64-NEXT: ucomiss %xmm1, %xmm0
177 ; SSE-64-NEXT: cmovbl %esi, %eax
180 ; AVX-32-LABEL: test_f32_oge_q:
182 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
183 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
184 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
185 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
186 ; AVX-32-NEXT: cmovael %eax, %ecx
187 ; AVX-32-NEXT: movl (%ecx), %eax
190 ; AVX-64-LABEL: test_f32_oge_q:
192 ; AVX-64-NEXT: movl %edi, %eax
193 ; AVX-64-NEXT: vucomiss %xmm1, %xmm0
194 ; AVX-64-NEXT: cmovbl %esi, %eax
197 ; X87-LABEL: test_f32_oge_q:
199 ; X87-NEXT: flds {{[0-9]+}}(%esp)
200 ; X87-NEXT: flds {{[0-9]+}}(%esp)
203 ; X87-NEXT: fnstsw %ax
204 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
206 ; X87-NEXT: jae .LBB2_1
208 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
209 ; X87-NEXT: movl (%eax), %eax
212 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
213 ; X87-NEXT: movl (%eax), %eax
216 ; X87-CMOV-LABEL: test_f32_oge_q:
218 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
219 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
220 ; X87-CMOV-NEXT: fucompi %st(1), %st
221 ; X87-CMOV-NEXT: fstp %st(0)
222 ; X87-CMOV-NEXT: wait
223 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
224 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
225 ; X87-CMOV-NEXT: cmovael %eax, %ecx
226 ; X87-CMOV-NEXT: movl (%ecx), %eax
227 ; X87-CMOV-NEXT: retl
228 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
229 float %f1, float %f2, metadata !"oge",
230 metadata !"fpexcept.strict") #0
231 %res = select i1 %cond, i32 %a, i32 %b
235 define i32 @test_f32_olt_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
236 ; SSE-32-LABEL: test_f32_olt_q:
238 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
239 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
240 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
241 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
242 ; SSE-32-NEXT: cmoval %eax, %ecx
243 ; SSE-32-NEXT: movl (%ecx), %eax
246 ; SSE-64-LABEL: test_f32_olt_q:
248 ; SSE-64-NEXT: movl %edi, %eax
249 ; SSE-64-NEXT: ucomiss %xmm0, %xmm1
250 ; SSE-64-NEXT: cmovbel %esi, %eax
253 ; AVX-32-LABEL: test_f32_olt_q:
255 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
256 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
257 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
258 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
259 ; AVX-32-NEXT: cmoval %eax, %ecx
260 ; AVX-32-NEXT: movl (%ecx), %eax
263 ; AVX-64-LABEL: test_f32_olt_q:
265 ; AVX-64-NEXT: movl %edi, %eax
266 ; AVX-64-NEXT: vucomiss %xmm0, %xmm1
267 ; AVX-64-NEXT: cmovbel %esi, %eax
270 ; X87-LABEL: test_f32_olt_q:
272 ; X87-NEXT: flds {{[0-9]+}}(%esp)
273 ; X87-NEXT: flds {{[0-9]+}}(%esp)
276 ; X87-NEXT: fnstsw %ax
277 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
279 ; X87-NEXT: ja .LBB3_1
281 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
282 ; X87-NEXT: movl (%eax), %eax
285 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
286 ; X87-NEXT: movl (%eax), %eax
289 ; X87-CMOV-LABEL: test_f32_olt_q:
291 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
292 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
293 ; X87-CMOV-NEXT: fucompi %st(1), %st
294 ; X87-CMOV-NEXT: fstp %st(0)
295 ; X87-CMOV-NEXT: wait
296 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
297 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
298 ; X87-CMOV-NEXT: cmoval %eax, %ecx
299 ; X87-CMOV-NEXT: movl (%ecx), %eax
300 ; X87-CMOV-NEXT: retl
301 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
302 float %f1, float %f2, metadata !"olt",
303 metadata !"fpexcept.strict") #0
304 %res = select i1 %cond, i32 %a, i32 %b
308 define i32 @test_f32_ole_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
309 ; SSE-32-LABEL: test_f32_ole_q:
311 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
312 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
313 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
314 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
315 ; SSE-32-NEXT: cmovael %eax, %ecx
316 ; SSE-32-NEXT: movl (%ecx), %eax
319 ; SSE-64-LABEL: test_f32_ole_q:
321 ; SSE-64-NEXT: movl %edi, %eax
322 ; SSE-64-NEXT: ucomiss %xmm0, %xmm1
323 ; SSE-64-NEXT: cmovbl %esi, %eax
326 ; AVX-32-LABEL: test_f32_ole_q:
328 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
329 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
330 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
331 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
332 ; AVX-32-NEXT: cmovael %eax, %ecx
333 ; AVX-32-NEXT: movl (%ecx), %eax
336 ; AVX-64-LABEL: test_f32_ole_q:
338 ; AVX-64-NEXT: movl %edi, %eax
339 ; AVX-64-NEXT: vucomiss %xmm0, %xmm1
340 ; AVX-64-NEXT: cmovbl %esi, %eax
343 ; X87-LABEL: test_f32_ole_q:
345 ; X87-NEXT: flds {{[0-9]+}}(%esp)
346 ; X87-NEXT: flds {{[0-9]+}}(%esp)
349 ; X87-NEXT: fnstsw %ax
350 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
352 ; X87-NEXT: jae .LBB4_1
354 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
355 ; X87-NEXT: movl (%eax), %eax
358 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
359 ; X87-NEXT: movl (%eax), %eax
362 ; X87-CMOV-LABEL: test_f32_ole_q:
364 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
365 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
366 ; X87-CMOV-NEXT: fucompi %st(1), %st
367 ; X87-CMOV-NEXT: fstp %st(0)
368 ; X87-CMOV-NEXT: wait
369 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
370 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
371 ; X87-CMOV-NEXT: cmovael %eax, %ecx
372 ; X87-CMOV-NEXT: movl (%ecx), %eax
373 ; X87-CMOV-NEXT: retl
374 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
375 float %f1, float %f2, metadata !"ole",
376 metadata !"fpexcept.strict") #0
377 %res = select i1 %cond, i32 %a, i32 %b
381 define i32 @test_f32_one_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
382 ; SSE-32-LABEL: test_f32_one_q:
384 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
385 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
386 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
387 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
388 ; SSE-32-NEXT: cmovnel %eax, %ecx
389 ; SSE-32-NEXT: movl (%ecx), %eax
392 ; SSE-64-LABEL: test_f32_one_q:
394 ; SSE-64-NEXT: movl %edi, %eax
395 ; SSE-64-NEXT: ucomiss %xmm1, %xmm0
396 ; SSE-64-NEXT: cmovel %esi, %eax
399 ; AVX-32-LABEL: test_f32_one_q:
401 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
402 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
403 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
404 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
405 ; AVX-32-NEXT: cmovnel %eax, %ecx
406 ; AVX-32-NEXT: movl (%ecx), %eax
409 ; AVX-64-LABEL: test_f32_one_q:
411 ; AVX-64-NEXT: movl %edi, %eax
412 ; AVX-64-NEXT: vucomiss %xmm1, %xmm0
413 ; AVX-64-NEXT: cmovel %esi, %eax
416 ; X87-LABEL: test_f32_one_q:
418 ; X87-NEXT: flds {{[0-9]+}}(%esp)
419 ; X87-NEXT: flds {{[0-9]+}}(%esp)
422 ; X87-NEXT: fnstsw %ax
423 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
425 ; X87-NEXT: jne .LBB5_1
427 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
428 ; X87-NEXT: movl (%eax), %eax
431 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
432 ; X87-NEXT: movl (%eax), %eax
435 ; X87-CMOV-LABEL: test_f32_one_q:
437 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
438 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
439 ; X87-CMOV-NEXT: fucompi %st(1), %st
440 ; X87-CMOV-NEXT: fstp %st(0)
441 ; X87-CMOV-NEXT: wait
442 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
443 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
444 ; X87-CMOV-NEXT: cmovnel %eax, %ecx
445 ; X87-CMOV-NEXT: movl (%ecx), %eax
446 ; X87-CMOV-NEXT: retl
447 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
448 float %f1, float %f2, metadata !"one",
449 metadata !"fpexcept.strict") #0
450 %res = select i1 %cond, i32 %a, i32 %b
454 define i32 @test_f32_ord_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
455 ; SSE-32-LABEL: test_f32_ord_q:
457 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
458 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
459 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
460 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
461 ; SSE-32-NEXT: cmovnpl %eax, %ecx
462 ; SSE-32-NEXT: movl (%ecx), %eax
465 ; SSE-64-LABEL: test_f32_ord_q:
467 ; SSE-64-NEXT: movl %edi, %eax
468 ; SSE-64-NEXT: ucomiss %xmm1, %xmm0
469 ; SSE-64-NEXT: cmovpl %esi, %eax
472 ; AVX-32-LABEL: test_f32_ord_q:
474 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
475 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
476 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
477 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
478 ; AVX-32-NEXT: cmovnpl %eax, %ecx
479 ; AVX-32-NEXT: movl (%ecx), %eax
482 ; AVX-64-LABEL: test_f32_ord_q:
484 ; AVX-64-NEXT: movl %edi, %eax
485 ; AVX-64-NEXT: vucomiss %xmm1, %xmm0
486 ; AVX-64-NEXT: cmovpl %esi, %eax
489 ; X87-LABEL: test_f32_ord_q:
491 ; X87-NEXT: flds {{[0-9]+}}(%esp)
492 ; X87-NEXT: flds {{[0-9]+}}(%esp)
495 ; X87-NEXT: fnstsw %ax
496 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
498 ; X87-NEXT: jnp .LBB6_1
500 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
501 ; X87-NEXT: movl (%eax), %eax
504 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
505 ; X87-NEXT: movl (%eax), %eax
508 ; X87-CMOV-LABEL: test_f32_ord_q:
510 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
511 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
512 ; X87-CMOV-NEXT: fucompi %st(1), %st
513 ; X87-CMOV-NEXT: fstp %st(0)
514 ; X87-CMOV-NEXT: wait
515 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
516 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
517 ; X87-CMOV-NEXT: cmovnpl %eax, %ecx
518 ; X87-CMOV-NEXT: movl (%ecx), %eax
519 ; X87-CMOV-NEXT: retl
520 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
521 float %f1, float %f2, metadata !"ord",
522 metadata !"fpexcept.strict") #0
523 %res = select i1 %cond, i32 %a, i32 %b
527 define i32 @test_f32_ueq_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
528 ; SSE-32-LABEL: test_f32_ueq_q:
530 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
531 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
532 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
533 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
534 ; SSE-32-NEXT: cmovel %eax, %ecx
535 ; SSE-32-NEXT: movl (%ecx), %eax
538 ; SSE-64-LABEL: test_f32_ueq_q:
540 ; SSE-64-NEXT: movl %edi, %eax
541 ; SSE-64-NEXT: ucomiss %xmm1, %xmm0
542 ; SSE-64-NEXT: cmovnel %esi, %eax
545 ; AVX-32-LABEL: test_f32_ueq_q:
547 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
548 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
549 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
550 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
551 ; AVX-32-NEXT: cmovel %eax, %ecx
552 ; AVX-32-NEXT: movl (%ecx), %eax
555 ; AVX-64-LABEL: test_f32_ueq_q:
557 ; AVX-64-NEXT: movl %edi, %eax
558 ; AVX-64-NEXT: vucomiss %xmm1, %xmm0
559 ; AVX-64-NEXT: cmovnel %esi, %eax
562 ; X87-LABEL: test_f32_ueq_q:
564 ; X87-NEXT: flds {{[0-9]+}}(%esp)
565 ; X87-NEXT: flds {{[0-9]+}}(%esp)
568 ; X87-NEXT: fnstsw %ax
569 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
571 ; X87-NEXT: je .LBB7_1
573 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
574 ; X87-NEXT: movl (%eax), %eax
577 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
578 ; X87-NEXT: movl (%eax), %eax
581 ; X87-CMOV-LABEL: test_f32_ueq_q:
583 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
584 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
585 ; X87-CMOV-NEXT: fucompi %st(1), %st
586 ; X87-CMOV-NEXT: fstp %st(0)
587 ; X87-CMOV-NEXT: wait
588 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
589 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
590 ; X87-CMOV-NEXT: cmovel %eax, %ecx
591 ; X87-CMOV-NEXT: movl (%ecx), %eax
592 ; X87-CMOV-NEXT: retl
593 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
594 float %f1, float %f2, metadata !"ueq",
595 metadata !"fpexcept.strict") #0
596 %res = select i1 %cond, i32 %a, i32 %b
600 define i32 @test_f32_ugt_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
601 ; SSE-32-LABEL: test_f32_ugt_q:
603 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
604 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
605 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
606 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
607 ; SSE-32-NEXT: cmovbl %eax, %ecx
608 ; SSE-32-NEXT: movl (%ecx), %eax
611 ; SSE-64-LABEL: test_f32_ugt_q:
613 ; SSE-64-NEXT: movl %edi, %eax
614 ; SSE-64-NEXT: ucomiss %xmm0, %xmm1
615 ; SSE-64-NEXT: cmovael %esi, %eax
618 ; AVX-32-LABEL: test_f32_ugt_q:
620 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
621 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
622 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
623 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
624 ; AVX-32-NEXT: cmovbl %eax, %ecx
625 ; AVX-32-NEXT: movl (%ecx), %eax
628 ; AVX-64-LABEL: test_f32_ugt_q:
630 ; AVX-64-NEXT: movl %edi, %eax
631 ; AVX-64-NEXT: vucomiss %xmm0, %xmm1
632 ; AVX-64-NEXT: cmovael %esi, %eax
635 ; X87-LABEL: test_f32_ugt_q:
637 ; X87-NEXT: flds {{[0-9]+}}(%esp)
638 ; X87-NEXT: flds {{[0-9]+}}(%esp)
641 ; X87-NEXT: fnstsw %ax
642 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
644 ; X87-NEXT: jb .LBB8_1
646 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
647 ; X87-NEXT: movl (%eax), %eax
650 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
651 ; X87-NEXT: movl (%eax), %eax
654 ; X87-CMOV-LABEL: test_f32_ugt_q:
656 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
657 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
658 ; X87-CMOV-NEXT: fucompi %st(1), %st
659 ; X87-CMOV-NEXT: fstp %st(0)
660 ; X87-CMOV-NEXT: wait
661 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
662 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
663 ; X87-CMOV-NEXT: cmovbl %eax, %ecx
664 ; X87-CMOV-NEXT: movl (%ecx), %eax
665 ; X87-CMOV-NEXT: retl
666 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
667 float %f1, float %f2, metadata !"ugt",
668 metadata !"fpexcept.strict") #0
669 %res = select i1 %cond, i32 %a, i32 %b
673 define i32 @test_f32_uge_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
674 ; SSE-32-LABEL: test_f32_uge_q:
676 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
677 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
678 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
679 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
680 ; SSE-32-NEXT: cmovbel %eax, %ecx
681 ; SSE-32-NEXT: movl (%ecx), %eax
684 ; SSE-64-LABEL: test_f32_uge_q:
686 ; SSE-64-NEXT: movl %edi, %eax
687 ; SSE-64-NEXT: ucomiss %xmm0, %xmm1
688 ; SSE-64-NEXT: cmoval %esi, %eax
691 ; AVX-32-LABEL: test_f32_uge_q:
693 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
694 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
695 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
696 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
697 ; AVX-32-NEXT: cmovbel %eax, %ecx
698 ; AVX-32-NEXT: movl (%ecx), %eax
701 ; AVX-64-LABEL: test_f32_uge_q:
703 ; AVX-64-NEXT: movl %edi, %eax
704 ; AVX-64-NEXT: vucomiss %xmm0, %xmm1
705 ; AVX-64-NEXT: cmoval %esi, %eax
708 ; X87-LABEL: test_f32_uge_q:
710 ; X87-NEXT: flds {{[0-9]+}}(%esp)
711 ; X87-NEXT: flds {{[0-9]+}}(%esp)
714 ; X87-NEXT: fnstsw %ax
715 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
717 ; X87-NEXT: jbe .LBB9_1
719 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
720 ; X87-NEXT: movl (%eax), %eax
723 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
724 ; X87-NEXT: movl (%eax), %eax
727 ; X87-CMOV-LABEL: test_f32_uge_q:
729 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
730 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
731 ; X87-CMOV-NEXT: fucompi %st(1), %st
732 ; X87-CMOV-NEXT: fstp %st(0)
733 ; X87-CMOV-NEXT: wait
734 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
735 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
736 ; X87-CMOV-NEXT: cmovbel %eax, %ecx
737 ; X87-CMOV-NEXT: movl (%ecx), %eax
738 ; X87-CMOV-NEXT: retl
739 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
740 float %f1, float %f2, metadata !"uge",
741 metadata !"fpexcept.strict") #0
742 %res = select i1 %cond, i32 %a, i32 %b
746 define i32 @test_f32_ult_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
747 ; SSE-32-LABEL: test_f32_ult_q:
749 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
750 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
751 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
752 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
753 ; SSE-32-NEXT: cmovbl %eax, %ecx
754 ; SSE-32-NEXT: movl (%ecx), %eax
757 ; SSE-64-LABEL: test_f32_ult_q:
759 ; SSE-64-NEXT: movl %edi, %eax
760 ; SSE-64-NEXT: ucomiss %xmm1, %xmm0
761 ; SSE-64-NEXT: cmovael %esi, %eax
764 ; AVX-32-LABEL: test_f32_ult_q:
766 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
767 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
768 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
769 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
770 ; AVX-32-NEXT: cmovbl %eax, %ecx
771 ; AVX-32-NEXT: movl (%ecx), %eax
774 ; AVX-64-LABEL: test_f32_ult_q:
776 ; AVX-64-NEXT: movl %edi, %eax
777 ; AVX-64-NEXT: vucomiss %xmm1, %xmm0
778 ; AVX-64-NEXT: cmovael %esi, %eax
781 ; X87-LABEL: test_f32_ult_q:
783 ; X87-NEXT: flds {{[0-9]+}}(%esp)
784 ; X87-NEXT: flds {{[0-9]+}}(%esp)
787 ; X87-NEXT: fnstsw %ax
788 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
790 ; X87-NEXT: jb .LBB10_1
792 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
793 ; X87-NEXT: movl (%eax), %eax
795 ; X87-NEXT: .LBB10_1:
796 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
797 ; X87-NEXT: movl (%eax), %eax
800 ; X87-CMOV-LABEL: test_f32_ult_q:
802 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
803 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
804 ; X87-CMOV-NEXT: fucompi %st(1), %st
805 ; X87-CMOV-NEXT: fstp %st(0)
806 ; X87-CMOV-NEXT: wait
807 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
808 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
809 ; X87-CMOV-NEXT: cmovbl %eax, %ecx
810 ; X87-CMOV-NEXT: movl (%ecx), %eax
811 ; X87-CMOV-NEXT: retl
812 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
813 float %f1, float %f2, metadata !"ult",
814 metadata !"fpexcept.strict") #0
815 %res = select i1 %cond, i32 %a, i32 %b
819 define i32 @test_f32_ule_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
820 ; SSE-32-LABEL: test_f32_ule_q:
822 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
823 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
824 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
825 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
826 ; SSE-32-NEXT: cmovbel %eax, %ecx
827 ; SSE-32-NEXT: movl (%ecx), %eax
830 ; SSE-64-LABEL: test_f32_ule_q:
832 ; SSE-64-NEXT: movl %edi, %eax
833 ; SSE-64-NEXT: ucomiss %xmm1, %xmm0
834 ; SSE-64-NEXT: cmoval %esi, %eax
837 ; AVX-32-LABEL: test_f32_ule_q:
839 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
840 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
841 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
842 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
843 ; AVX-32-NEXT: cmovbel %eax, %ecx
844 ; AVX-32-NEXT: movl (%ecx), %eax
847 ; AVX-64-LABEL: test_f32_ule_q:
849 ; AVX-64-NEXT: movl %edi, %eax
850 ; AVX-64-NEXT: vucomiss %xmm1, %xmm0
851 ; AVX-64-NEXT: cmoval %esi, %eax
854 ; X87-LABEL: test_f32_ule_q:
856 ; X87-NEXT: flds {{[0-9]+}}(%esp)
857 ; X87-NEXT: flds {{[0-9]+}}(%esp)
860 ; X87-NEXT: fnstsw %ax
861 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
863 ; X87-NEXT: jbe .LBB11_1
865 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
866 ; X87-NEXT: movl (%eax), %eax
868 ; X87-NEXT: .LBB11_1:
869 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
870 ; X87-NEXT: movl (%eax), %eax
873 ; X87-CMOV-LABEL: test_f32_ule_q:
875 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
876 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
877 ; X87-CMOV-NEXT: fucompi %st(1), %st
878 ; X87-CMOV-NEXT: fstp %st(0)
879 ; X87-CMOV-NEXT: wait
880 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
881 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
882 ; X87-CMOV-NEXT: cmovbel %eax, %ecx
883 ; X87-CMOV-NEXT: movl (%ecx), %eax
884 ; X87-CMOV-NEXT: retl
885 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
886 float %f1, float %f2, metadata !"ule",
887 metadata !"fpexcept.strict") #0
888 %res = select i1 %cond, i32 %a, i32 %b
892 define i32 @test_f32_une_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
893 ; SSE-32-LABEL: test_f32_une_q:
895 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
896 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
897 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
898 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
899 ; SSE-32-NEXT: cmovnel %eax, %ecx
900 ; SSE-32-NEXT: cmovpl %eax, %ecx
901 ; SSE-32-NEXT: movl (%ecx), %eax
904 ; SSE-64-LABEL: test_f32_une_q:
906 ; SSE-64-NEXT: movl %esi, %eax
907 ; SSE-64-NEXT: ucomiss %xmm1, %xmm0
908 ; SSE-64-NEXT: cmovnel %edi, %eax
909 ; SSE-64-NEXT: cmovpl %edi, %eax
912 ; AVX-32-LABEL: test_f32_une_q:
914 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
915 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
916 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
917 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
918 ; AVX-32-NEXT: cmovnel %eax, %ecx
919 ; AVX-32-NEXT: cmovpl %eax, %ecx
920 ; AVX-32-NEXT: movl (%ecx), %eax
923 ; AVX-64-LABEL: test_f32_une_q:
925 ; AVX-64-NEXT: movl %esi, %eax
926 ; AVX-64-NEXT: vucomiss %xmm1, %xmm0
927 ; AVX-64-NEXT: cmovnel %edi, %eax
928 ; AVX-64-NEXT: cmovpl %edi, %eax
931 ; X87-LABEL: test_f32_une_q:
933 ; X87-NEXT: flds {{[0-9]+}}(%esp)
934 ; X87-NEXT: flds {{[0-9]+}}(%esp)
937 ; X87-NEXT: fnstsw %ax
938 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
940 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
941 ; X87-NEXT: jne .LBB12_3
943 ; X87-NEXT: jp .LBB12_3
945 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
946 ; X87-NEXT: .LBB12_3:
947 ; X87-NEXT: movl (%eax), %eax
950 ; X87-CMOV-LABEL: test_f32_une_q:
952 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
953 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
954 ; X87-CMOV-NEXT: fucompi %st(1), %st
955 ; X87-CMOV-NEXT: fstp %st(0)
956 ; X87-CMOV-NEXT: wait
957 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
958 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
959 ; X87-CMOV-NEXT: cmovnel %eax, %ecx
960 ; X87-CMOV-NEXT: cmovpl %eax, %ecx
961 ; X87-CMOV-NEXT: movl (%ecx), %eax
962 ; X87-CMOV-NEXT: retl
963 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
964 float %f1, float %f2, metadata !"une",
965 metadata !"fpexcept.strict") #0
966 %res = select i1 %cond, i32 %a, i32 %b
970 define i32 @test_f32_uno_q(i32 %a, i32 %b, float %f1, float %f2) #0 {
971 ; SSE-32-LABEL: test_f32_uno_q:
973 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
974 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
975 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
976 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
977 ; SSE-32-NEXT: cmovpl %eax, %ecx
978 ; SSE-32-NEXT: movl (%ecx), %eax
981 ; SSE-64-LABEL: test_f32_uno_q:
983 ; SSE-64-NEXT: movl %edi, %eax
984 ; SSE-64-NEXT: ucomiss %xmm1, %xmm0
985 ; SSE-64-NEXT: cmovnpl %esi, %eax
988 ; AVX-32-LABEL: test_f32_uno_q:
990 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
991 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
992 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
993 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
994 ; AVX-32-NEXT: cmovpl %eax, %ecx
995 ; AVX-32-NEXT: movl (%ecx), %eax
998 ; AVX-64-LABEL: test_f32_uno_q:
1000 ; AVX-64-NEXT: movl %edi, %eax
1001 ; AVX-64-NEXT: vucomiss %xmm1, %xmm0
1002 ; AVX-64-NEXT: cmovnpl %esi, %eax
1005 ; X87-LABEL: test_f32_uno_q:
1007 ; X87-NEXT: flds {{[0-9]+}}(%esp)
1008 ; X87-NEXT: flds {{[0-9]+}}(%esp)
1011 ; X87-NEXT: fnstsw %ax
1012 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
1014 ; X87-NEXT: jp .LBB13_1
1015 ; X87-NEXT: # %bb.2:
1016 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1017 ; X87-NEXT: movl (%eax), %eax
1019 ; X87-NEXT: .LBB13_1:
1020 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1021 ; X87-NEXT: movl (%eax), %eax
1024 ; X87-CMOV-LABEL: test_f32_uno_q:
1025 ; X87-CMOV: # %bb.0:
1026 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
1027 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
1028 ; X87-CMOV-NEXT: fucompi %st(1), %st
1029 ; X87-CMOV-NEXT: fstp %st(0)
1030 ; X87-CMOV-NEXT: wait
1031 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
1032 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
1033 ; X87-CMOV-NEXT: cmovpl %eax, %ecx
1034 ; X87-CMOV-NEXT: movl (%ecx), %eax
1035 ; X87-CMOV-NEXT: retl
1036 %cond = call i1 @llvm.experimental.constrained.fcmp.f32(
1037 float %f1, float %f2, metadata !"uno",
1038 metadata !"fpexcept.strict") #0
1039 %res = select i1 %cond, i32 %a, i32 %b
1043 define i32 @test_f64_oeq_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
1044 ; SSE-32-LABEL: test_f64_oeq_q:
1046 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1047 ; SSE-32-NEXT: ucomisd {{[0-9]+}}(%esp), %xmm0
1048 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1049 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1050 ; SSE-32-NEXT: cmovnel %eax, %ecx
1051 ; SSE-32-NEXT: cmovpl %eax, %ecx
1052 ; SSE-32-NEXT: movl (%ecx), %eax
1055 ; SSE-64-LABEL: test_f64_oeq_q:
1057 ; SSE-64-NEXT: movl %edi, %eax
1058 ; SSE-64-NEXT: ucomisd %xmm1, %xmm0
1059 ; SSE-64-NEXT: cmovnel %esi, %eax
1060 ; SSE-64-NEXT: cmovpl %esi, %eax
1063 ; AVX-32-LABEL: test_f64_oeq_q:
1065 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1066 ; AVX-32-NEXT: vucomisd {{[0-9]+}}(%esp), %xmm0
1067 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1068 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1069 ; AVX-32-NEXT: cmovnel %eax, %ecx
1070 ; AVX-32-NEXT: cmovpl %eax, %ecx
1071 ; AVX-32-NEXT: movl (%ecx), %eax
1074 ; AVX-64-LABEL: test_f64_oeq_q:
1076 ; AVX-64-NEXT: movl %edi, %eax
1077 ; AVX-64-NEXT: vucomisd %xmm1, %xmm0
1078 ; AVX-64-NEXT: cmovnel %esi, %eax
1079 ; AVX-64-NEXT: cmovpl %esi, %eax
1082 ; X87-LABEL: test_f64_oeq_q:
1084 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1085 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1088 ; X87-NEXT: fnstsw %ax
1089 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
1091 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1092 ; X87-NEXT: jne .LBB14_3
1093 ; X87-NEXT: # %bb.1:
1094 ; X87-NEXT: jp .LBB14_3
1095 ; X87-NEXT: # %bb.2:
1096 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1097 ; X87-NEXT: .LBB14_3:
1098 ; X87-NEXT: movl (%eax), %eax
1101 ; X87-CMOV-LABEL: test_f64_oeq_q:
1102 ; X87-CMOV: # %bb.0:
1103 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1104 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1105 ; X87-CMOV-NEXT: fucompi %st(1), %st
1106 ; X87-CMOV-NEXT: fstp %st(0)
1107 ; X87-CMOV-NEXT: wait
1108 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
1109 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
1110 ; X87-CMOV-NEXT: cmovnel %eax, %ecx
1111 ; X87-CMOV-NEXT: cmovpl %eax, %ecx
1112 ; X87-CMOV-NEXT: movl (%ecx), %eax
1113 ; X87-CMOV-NEXT: retl
1114 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
1115 double %f1, double %f2, metadata !"oeq",
1116 metadata !"fpexcept.strict") #0
1117 %res = select i1 %cond, i32 %a, i32 %b
1121 define i32 @test_f64_ogt_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
1122 ; SSE-32-LABEL: test_f64_ogt_q:
1124 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1125 ; SSE-32-NEXT: ucomisd {{[0-9]+}}(%esp), %xmm0
1126 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1127 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1128 ; SSE-32-NEXT: cmoval %eax, %ecx
1129 ; SSE-32-NEXT: movl (%ecx), %eax
1132 ; SSE-64-LABEL: test_f64_ogt_q:
1134 ; SSE-64-NEXT: movl %edi, %eax
1135 ; SSE-64-NEXT: ucomisd %xmm1, %xmm0
1136 ; SSE-64-NEXT: cmovbel %esi, %eax
1139 ; AVX-32-LABEL: test_f64_ogt_q:
1141 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1142 ; AVX-32-NEXT: vucomisd {{[0-9]+}}(%esp), %xmm0
1143 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1144 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1145 ; AVX-32-NEXT: cmoval %eax, %ecx
1146 ; AVX-32-NEXT: movl (%ecx), %eax
1149 ; AVX-64-LABEL: test_f64_ogt_q:
1151 ; AVX-64-NEXT: movl %edi, %eax
1152 ; AVX-64-NEXT: vucomisd %xmm1, %xmm0
1153 ; AVX-64-NEXT: cmovbel %esi, %eax
1156 ; X87-LABEL: test_f64_ogt_q:
1158 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1159 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1162 ; X87-NEXT: fnstsw %ax
1163 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
1165 ; X87-NEXT: ja .LBB15_1
1166 ; X87-NEXT: # %bb.2:
1167 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1168 ; X87-NEXT: movl (%eax), %eax
1170 ; X87-NEXT: .LBB15_1:
1171 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1172 ; X87-NEXT: movl (%eax), %eax
1175 ; X87-CMOV-LABEL: test_f64_ogt_q:
1176 ; X87-CMOV: # %bb.0:
1177 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1178 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1179 ; X87-CMOV-NEXT: fucompi %st(1), %st
1180 ; X87-CMOV-NEXT: fstp %st(0)
1181 ; X87-CMOV-NEXT: wait
1182 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
1183 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
1184 ; X87-CMOV-NEXT: cmoval %eax, %ecx
1185 ; X87-CMOV-NEXT: movl (%ecx), %eax
1186 ; X87-CMOV-NEXT: retl
1187 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
1188 double %f1, double %f2, metadata !"ogt",
1189 metadata !"fpexcept.strict") #0
1190 %res = select i1 %cond, i32 %a, i32 %b
1194 define i32 @test_f64_oge_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
1195 ; SSE-32-LABEL: test_f64_oge_q:
1197 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1198 ; SSE-32-NEXT: ucomisd {{[0-9]+}}(%esp), %xmm0
1199 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1200 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1201 ; SSE-32-NEXT: cmovael %eax, %ecx
1202 ; SSE-32-NEXT: movl (%ecx), %eax
1205 ; SSE-64-LABEL: test_f64_oge_q:
1207 ; SSE-64-NEXT: movl %edi, %eax
1208 ; SSE-64-NEXT: ucomisd %xmm1, %xmm0
1209 ; SSE-64-NEXT: cmovbl %esi, %eax
1212 ; AVX-32-LABEL: test_f64_oge_q:
1214 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1215 ; AVX-32-NEXT: vucomisd {{[0-9]+}}(%esp), %xmm0
1216 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1217 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1218 ; AVX-32-NEXT: cmovael %eax, %ecx
1219 ; AVX-32-NEXT: movl (%ecx), %eax
1222 ; AVX-64-LABEL: test_f64_oge_q:
1224 ; AVX-64-NEXT: movl %edi, %eax
1225 ; AVX-64-NEXT: vucomisd %xmm1, %xmm0
1226 ; AVX-64-NEXT: cmovbl %esi, %eax
1229 ; X87-LABEL: test_f64_oge_q:
1231 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1232 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1235 ; X87-NEXT: fnstsw %ax
1236 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
1238 ; X87-NEXT: jae .LBB16_1
1239 ; X87-NEXT: # %bb.2:
1240 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1241 ; X87-NEXT: movl (%eax), %eax
1243 ; X87-NEXT: .LBB16_1:
1244 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1245 ; X87-NEXT: movl (%eax), %eax
1248 ; X87-CMOV-LABEL: test_f64_oge_q:
1249 ; X87-CMOV: # %bb.0:
1250 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1251 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1252 ; X87-CMOV-NEXT: fucompi %st(1), %st
1253 ; X87-CMOV-NEXT: fstp %st(0)
1254 ; X87-CMOV-NEXT: wait
1255 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
1256 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
1257 ; X87-CMOV-NEXT: cmovael %eax, %ecx
1258 ; X87-CMOV-NEXT: movl (%ecx), %eax
1259 ; X87-CMOV-NEXT: retl
1260 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
1261 double %f1, double %f2, metadata !"oge",
1262 metadata !"fpexcept.strict") #0
1263 %res = select i1 %cond, i32 %a, i32 %b
1267 define i32 @test_f64_olt_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
1268 ; SSE-32-LABEL: test_f64_olt_q:
1270 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1271 ; SSE-32-NEXT: ucomisd {{[0-9]+}}(%esp), %xmm0
1272 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1273 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1274 ; SSE-32-NEXT: cmoval %eax, %ecx
1275 ; SSE-32-NEXT: movl (%ecx), %eax
1278 ; SSE-64-LABEL: test_f64_olt_q:
1280 ; SSE-64-NEXT: movl %edi, %eax
1281 ; SSE-64-NEXT: ucomisd %xmm0, %xmm1
1282 ; SSE-64-NEXT: cmovbel %esi, %eax
1285 ; AVX-32-LABEL: test_f64_olt_q:
1287 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1288 ; AVX-32-NEXT: vucomisd {{[0-9]+}}(%esp), %xmm0
1289 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1290 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1291 ; AVX-32-NEXT: cmoval %eax, %ecx
1292 ; AVX-32-NEXT: movl (%ecx), %eax
1295 ; AVX-64-LABEL: test_f64_olt_q:
1297 ; AVX-64-NEXT: movl %edi, %eax
1298 ; AVX-64-NEXT: vucomisd %xmm0, %xmm1
1299 ; AVX-64-NEXT: cmovbel %esi, %eax
1302 ; X87-LABEL: test_f64_olt_q:
1304 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1305 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1308 ; X87-NEXT: fnstsw %ax
1309 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
1311 ; X87-NEXT: ja .LBB17_1
1312 ; X87-NEXT: # %bb.2:
1313 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1314 ; X87-NEXT: movl (%eax), %eax
1316 ; X87-NEXT: .LBB17_1:
1317 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1318 ; X87-NEXT: movl (%eax), %eax
1321 ; X87-CMOV-LABEL: test_f64_olt_q:
1322 ; X87-CMOV: # %bb.0:
1323 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1324 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1325 ; X87-CMOV-NEXT: fucompi %st(1), %st
1326 ; X87-CMOV-NEXT: fstp %st(0)
1327 ; X87-CMOV-NEXT: wait
1328 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
1329 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
1330 ; X87-CMOV-NEXT: cmoval %eax, %ecx
1331 ; X87-CMOV-NEXT: movl (%ecx), %eax
1332 ; X87-CMOV-NEXT: retl
1333 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
1334 double %f1, double %f2, metadata !"olt",
1335 metadata !"fpexcept.strict") #0
1336 %res = select i1 %cond, i32 %a, i32 %b
1340 define i32 @test_f64_ole_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
1341 ; SSE-32-LABEL: test_f64_ole_q:
1343 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1344 ; SSE-32-NEXT: ucomisd {{[0-9]+}}(%esp), %xmm0
1345 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1346 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1347 ; SSE-32-NEXT: cmovael %eax, %ecx
1348 ; SSE-32-NEXT: movl (%ecx), %eax
1351 ; SSE-64-LABEL: test_f64_ole_q:
1353 ; SSE-64-NEXT: movl %edi, %eax
1354 ; SSE-64-NEXT: ucomisd %xmm0, %xmm1
1355 ; SSE-64-NEXT: cmovbl %esi, %eax
1358 ; AVX-32-LABEL: test_f64_ole_q:
1360 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1361 ; AVX-32-NEXT: vucomisd {{[0-9]+}}(%esp), %xmm0
1362 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1363 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1364 ; AVX-32-NEXT: cmovael %eax, %ecx
1365 ; AVX-32-NEXT: movl (%ecx), %eax
1368 ; AVX-64-LABEL: test_f64_ole_q:
1370 ; AVX-64-NEXT: movl %edi, %eax
1371 ; AVX-64-NEXT: vucomisd %xmm0, %xmm1
1372 ; AVX-64-NEXT: cmovbl %esi, %eax
1375 ; X87-LABEL: test_f64_ole_q:
1377 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1378 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1381 ; X87-NEXT: fnstsw %ax
1382 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
1384 ; X87-NEXT: jae .LBB18_1
1385 ; X87-NEXT: # %bb.2:
1386 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1387 ; X87-NEXT: movl (%eax), %eax
1389 ; X87-NEXT: .LBB18_1:
1390 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1391 ; X87-NEXT: movl (%eax), %eax
1394 ; X87-CMOV-LABEL: test_f64_ole_q:
1395 ; X87-CMOV: # %bb.0:
1396 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1397 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1398 ; X87-CMOV-NEXT: fucompi %st(1), %st
1399 ; X87-CMOV-NEXT: fstp %st(0)
1400 ; X87-CMOV-NEXT: wait
1401 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
1402 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
1403 ; X87-CMOV-NEXT: cmovael %eax, %ecx
1404 ; X87-CMOV-NEXT: movl (%ecx), %eax
1405 ; X87-CMOV-NEXT: retl
1406 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
1407 double %f1, double %f2, metadata !"ole",
1408 metadata !"fpexcept.strict") #0
1409 %res = select i1 %cond, i32 %a, i32 %b
1413 define i32 @test_f64_one_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
1414 ; SSE-32-LABEL: test_f64_one_q:
1416 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1417 ; SSE-32-NEXT: ucomisd {{[0-9]+}}(%esp), %xmm0
1418 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1419 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1420 ; SSE-32-NEXT: cmovnel %eax, %ecx
1421 ; SSE-32-NEXT: movl (%ecx), %eax
1424 ; SSE-64-LABEL: test_f64_one_q:
1426 ; SSE-64-NEXT: movl %edi, %eax
1427 ; SSE-64-NEXT: ucomisd %xmm1, %xmm0
1428 ; SSE-64-NEXT: cmovel %esi, %eax
1431 ; AVX-32-LABEL: test_f64_one_q:
1433 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1434 ; AVX-32-NEXT: vucomisd {{[0-9]+}}(%esp), %xmm0
1435 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1436 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1437 ; AVX-32-NEXT: cmovnel %eax, %ecx
1438 ; AVX-32-NEXT: movl (%ecx), %eax
1441 ; AVX-64-LABEL: test_f64_one_q:
1443 ; AVX-64-NEXT: movl %edi, %eax
1444 ; AVX-64-NEXT: vucomisd %xmm1, %xmm0
1445 ; AVX-64-NEXT: cmovel %esi, %eax
1448 ; X87-LABEL: test_f64_one_q:
1450 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1451 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1454 ; X87-NEXT: fnstsw %ax
1455 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
1457 ; X87-NEXT: jne .LBB19_1
1458 ; X87-NEXT: # %bb.2:
1459 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1460 ; X87-NEXT: movl (%eax), %eax
1462 ; X87-NEXT: .LBB19_1:
1463 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1464 ; X87-NEXT: movl (%eax), %eax
1467 ; X87-CMOV-LABEL: test_f64_one_q:
1468 ; X87-CMOV: # %bb.0:
1469 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1470 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1471 ; X87-CMOV-NEXT: fucompi %st(1), %st
1472 ; X87-CMOV-NEXT: fstp %st(0)
1473 ; X87-CMOV-NEXT: wait
1474 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
1475 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
1476 ; X87-CMOV-NEXT: cmovnel %eax, %ecx
1477 ; X87-CMOV-NEXT: movl (%ecx), %eax
1478 ; X87-CMOV-NEXT: retl
1479 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
1480 double %f1, double %f2, metadata !"one",
1481 metadata !"fpexcept.strict") #0
1482 %res = select i1 %cond, i32 %a, i32 %b
1486 define i32 @test_f64_ord_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
1487 ; SSE-32-LABEL: test_f64_ord_q:
1489 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1490 ; SSE-32-NEXT: ucomisd {{[0-9]+}}(%esp), %xmm0
1491 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1492 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1493 ; SSE-32-NEXT: cmovnpl %eax, %ecx
1494 ; SSE-32-NEXT: movl (%ecx), %eax
1497 ; SSE-64-LABEL: test_f64_ord_q:
1499 ; SSE-64-NEXT: movl %edi, %eax
1500 ; SSE-64-NEXT: ucomisd %xmm1, %xmm0
1501 ; SSE-64-NEXT: cmovpl %esi, %eax
1504 ; AVX-32-LABEL: test_f64_ord_q:
1506 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1507 ; AVX-32-NEXT: vucomisd {{[0-9]+}}(%esp), %xmm0
1508 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1509 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1510 ; AVX-32-NEXT: cmovnpl %eax, %ecx
1511 ; AVX-32-NEXT: movl (%ecx), %eax
1514 ; AVX-64-LABEL: test_f64_ord_q:
1516 ; AVX-64-NEXT: movl %edi, %eax
1517 ; AVX-64-NEXT: vucomisd %xmm1, %xmm0
1518 ; AVX-64-NEXT: cmovpl %esi, %eax
1521 ; X87-LABEL: test_f64_ord_q:
1523 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1524 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1527 ; X87-NEXT: fnstsw %ax
1528 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
1530 ; X87-NEXT: jnp .LBB20_1
1531 ; X87-NEXT: # %bb.2:
1532 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1533 ; X87-NEXT: movl (%eax), %eax
1535 ; X87-NEXT: .LBB20_1:
1536 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1537 ; X87-NEXT: movl (%eax), %eax
1540 ; X87-CMOV-LABEL: test_f64_ord_q:
1541 ; X87-CMOV: # %bb.0:
1542 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1543 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1544 ; X87-CMOV-NEXT: fucompi %st(1), %st
1545 ; X87-CMOV-NEXT: fstp %st(0)
1546 ; X87-CMOV-NEXT: wait
1547 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
1548 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
1549 ; X87-CMOV-NEXT: cmovnpl %eax, %ecx
1550 ; X87-CMOV-NEXT: movl (%ecx), %eax
1551 ; X87-CMOV-NEXT: retl
1552 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
1553 double %f1, double %f2, metadata !"ord",
1554 metadata !"fpexcept.strict") #0
1555 %res = select i1 %cond, i32 %a, i32 %b
1559 define i32 @test_f64_ueq_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
1560 ; SSE-32-LABEL: test_f64_ueq_q:
1562 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1563 ; SSE-32-NEXT: ucomisd {{[0-9]+}}(%esp), %xmm0
1564 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1565 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1566 ; SSE-32-NEXT: cmovel %eax, %ecx
1567 ; SSE-32-NEXT: movl (%ecx), %eax
1570 ; SSE-64-LABEL: test_f64_ueq_q:
1572 ; SSE-64-NEXT: movl %edi, %eax
1573 ; SSE-64-NEXT: ucomisd %xmm1, %xmm0
1574 ; SSE-64-NEXT: cmovnel %esi, %eax
1577 ; AVX-32-LABEL: test_f64_ueq_q:
1579 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1580 ; AVX-32-NEXT: vucomisd {{[0-9]+}}(%esp), %xmm0
1581 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1582 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1583 ; AVX-32-NEXT: cmovel %eax, %ecx
1584 ; AVX-32-NEXT: movl (%ecx), %eax
1587 ; AVX-64-LABEL: test_f64_ueq_q:
1589 ; AVX-64-NEXT: movl %edi, %eax
1590 ; AVX-64-NEXT: vucomisd %xmm1, %xmm0
1591 ; AVX-64-NEXT: cmovnel %esi, %eax
1594 ; X87-LABEL: test_f64_ueq_q:
1596 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1597 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1600 ; X87-NEXT: fnstsw %ax
1601 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
1603 ; X87-NEXT: je .LBB21_1
1604 ; X87-NEXT: # %bb.2:
1605 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1606 ; X87-NEXT: movl (%eax), %eax
1608 ; X87-NEXT: .LBB21_1:
1609 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1610 ; X87-NEXT: movl (%eax), %eax
1613 ; X87-CMOV-LABEL: test_f64_ueq_q:
1614 ; X87-CMOV: # %bb.0:
1615 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1616 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1617 ; X87-CMOV-NEXT: fucompi %st(1), %st
1618 ; X87-CMOV-NEXT: fstp %st(0)
1619 ; X87-CMOV-NEXT: wait
1620 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
1621 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
1622 ; X87-CMOV-NEXT: cmovel %eax, %ecx
1623 ; X87-CMOV-NEXT: movl (%ecx), %eax
1624 ; X87-CMOV-NEXT: retl
1625 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
1626 double %f1, double %f2, metadata !"ueq",
1627 metadata !"fpexcept.strict") #0
1628 %res = select i1 %cond, i32 %a, i32 %b
1632 define i32 @test_f64_ugt_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
1633 ; SSE-32-LABEL: test_f64_ugt_q:
1635 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1636 ; SSE-32-NEXT: ucomisd {{[0-9]+}}(%esp), %xmm0
1637 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1638 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1639 ; SSE-32-NEXT: cmovbl %eax, %ecx
1640 ; SSE-32-NEXT: movl (%ecx), %eax
1643 ; SSE-64-LABEL: test_f64_ugt_q:
1645 ; SSE-64-NEXT: movl %edi, %eax
1646 ; SSE-64-NEXT: ucomisd %xmm0, %xmm1
1647 ; SSE-64-NEXT: cmovael %esi, %eax
1650 ; AVX-32-LABEL: test_f64_ugt_q:
1652 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1653 ; AVX-32-NEXT: vucomisd {{[0-9]+}}(%esp), %xmm0
1654 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1655 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1656 ; AVX-32-NEXT: cmovbl %eax, %ecx
1657 ; AVX-32-NEXT: movl (%ecx), %eax
1660 ; AVX-64-LABEL: test_f64_ugt_q:
1662 ; AVX-64-NEXT: movl %edi, %eax
1663 ; AVX-64-NEXT: vucomisd %xmm0, %xmm1
1664 ; AVX-64-NEXT: cmovael %esi, %eax
1667 ; X87-LABEL: test_f64_ugt_q:
1669 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1670 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1673 ; X87-NEXT: fnstsw %ax
1674 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
1676 ; X87-NEXT: jb .LBB22_1
1677 ; X87-NEXT: # %bb.2:
1678 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1679 ; X87-NEXT: movl (%eax), %eax
1681 ; X87-NEXT: .LBB22_1:
1682 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1683 ; X87-NEXT: movl (%eax), %eax
1686 ; X87-CMOV-LABEL: test_f64_ugt_q:
1687 ; X87-CMOV: # %bb.0:
1688 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1689 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1690 ; X87-CMOV-NEXT: fucompi %st(1), %st
1691 ; X87-CMOV-NEXT: fstp %st(0)
1692 ; X87-CMOV-NEXT: wait
1693 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
1694 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
1695 ; X87-CMOV-NEXT: cmovbl %eax, %ecx
1696 ; X87-CMOV-NEXT: movl (%ecx), %eax
1697 ; X87-CMOV-NEXT: retl
1698 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
1699 double %f1, double %f2, metadata !"ugt",
1700 metadata !"fpexcept.strict") #0
1701 %res = select i1 %cond, i32 %a, i32 %b
1705 define i32 @test_f64_uge_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
1706 ; SSE-32-LABEL: test_f64_uge_q:
1708 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1709 ; SSE-32-NEXT: ucomisd {{[0-9]+}}(%esp), %xmm0
1710 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1711 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1712 ; SSE-32-NEXT: cmovbel %eax, %ecx
1713 ; SSE-32-NEXT: movl (%ecx), %eax
1716 ; SSE-64-LABEL: test_f64_uge_q:
1718 ; SSE-64-NEXT: movl %edi, %eax
1719 ; SSE-64-NEXT: ucomisd %xmm0, %xmm1
1720 ; SSE-64-NEXT: cmoval %esi, %eax
1723 ; AVX-32-LABEL: test_f64_uge_q:
1725 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1726 ; AVX-32-NEXT: vucomisd {{[0-9]+}}(%esp), %xmm0
1727 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1728 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1729 ; AVX-32-NEXT: cmovbel %eax, %ecx
1730 ; AVX-32-NEXT: movl (%ecx), %eax
1733 ; AVX-64-LABEL: test_f64_uge_q:
1735 ; AVX-64-NEXT: movl %edi, %eax
1736 ; AVX-64-NEXT: vucomisd %xmm0, %xmm1
1737 ; AVX-64-NEXT: cmoval %esi, %eax
1740 ; X87-LABEL: test_f64_uge_q:
1742 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1743 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1746 ; X87-NEXT: fnstsw %ax
1747 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
1749 ; X87-NEXT: jbe .LBB23_1
1750 ; X87-NEXT: # %bb.2:
1751 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1752 ; X87-NEXT: movl (%eax), %eax
1754 ; X87-NEXT: .LBB23_1:
1755 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1756 ; X87-NEXT: movl (%eax), %eax
1759 ; X87-CMOV-LABEL: test_f64_uge_q:
1760 ; X87-CMOV: # %bb.0:
1761 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1762 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1763 ; X87-CMOV-NEXT: fucompi %st(1), %st
1764 ; X87-CMOV-NEXT: fstp %st(0)
1765 ; X87-CMOV-NEXT: wait
1766 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
1767 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
1768 ; X87-CMOV-NEXT: cmovbel %eax, %ecx
1769 ; X87-CMOV-NEXT: movl (%ecx), %eax
1770 ; X87-CMOV-NEXT: retl
1771 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
1772 double %f1, double %f2, metadata !"uge",
1773 metadata !"fpexcept.strict") #0
1774 %res = select i1 %cond, i32 %a, i32 %b
1778 define i32 @test_f64_ult_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
1779 ; SSE-32-LABEL: test_f64_ult_q:
1781 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1782 ; SSE-32-NEXT: ucomisd {{[0-9]+}}(%esp), %xmm0
1783 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1784 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1785 ; SSE-32-NEXT: cmovbl %eax, %ecx
1786 ; SSE-32-NEXT: movl (%ecx), %eax
1789 ; SSE-64-LABEL: test_f64_ult_q:
1791 ; SSE-64-NEXT: movl %edi, %eax
1792 ; SSE-64-NEXT: ucomisd %xmm1, %xmm0
1793 ; SSE-64-NEXT: cmovael %esi, %eax
1796 ; AVX-32-LABEL: test_f64_ult_q:
1798 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1799 ; AVX-32-NEXT: vucomisd {{[0-9]+}}(%esp), %xmm0
1800 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1801 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1802 ; AVX-32-NEXT: cmovbl %eax, %ecx
1803 ; AVX-32-NEXT: movl (%ecx), %eax
1806 ; AVX-64-LABEL: test_f64_ult_q:
1808 ; AVX-64-NEXT: movl %edi, %eax
1809 ; AVX-64-NEXT: vucomisd %xmm1, %xmm0
1810 ; AVX-64-NEXT: cmovael %esi, %eax
1813 ; X87-LABEL: test_f64_ult_q:
1815 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1816 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1819 ; X87-NEXT: fnstsw %ax
1820 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
1822 ; X87-NEXT: jb .LBB24_1
1823 ; X87-NEXT: # %bb.2:
1824 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1825 ; X87-NEXT: movl (%eax), %eax
1827 ; X87-NEXT: .LBB24_1:
1828 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1829 ; X87-NEXT: movl (%eax), %eax
1832 ; X87-CMOV-LABEL: test_f64_ult_q:
1833 ; X87-CMOV: # %bb.0:
1834 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1835 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1836 ; X87-CMOV-NEXT: fucompi %st(1), %st
1837 ; X87-CMOV-NEXT: fstp %st(0)
1838 ; X87-CMOV-NEXT: wait
1839 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
1840 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
1841 ; X87-CMOV-NEXT: cmovbl %eax, %ecx
1842 ; X87-CMOV-NEXT: movl (%ecx), %eax
1843 ; X87-CMOV-NEXT: retl
1844 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
1845 double %f1, double %f2, metadata !"ult",
1846 metadata !"fpexcept.strict") #0
1847 %res = select i1 %cond, i32 %a, i32 %b
1851 define i32 @test_f64_ule_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
1852 ; SSE-32-LABEL: test_f64_ule_q:
1854 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1855 ; SSE-32-NEXT: ucomisd {{[0-9]+}}(%esp), %xmm0
1856 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1857 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1858 ; SSE-32-NEXT: cmovbel %eax, %ecx
1859 ; SSE-32-NEXT: movl (%ecx), %eax
1862 ; SSE-64-LABEL: test_f64_ule_q:
1864 ; SSE-64-NEXT: movl %edi, %eax
1865 ; SSE-64-NEXT: ucomisd %xmm1, %xmm0
1866 ; SSE-64-NEXT: cmoval %esi, %eax
1869 ; AVX-32-LABEL: test_f64_ule_q:
1871 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1872 ; AVX-32-NEXT: vucomisd {{[0-9]+}}(%esp), %xmm0
1873 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1874 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1875 ; AVX-32-NEXT: cmovbel %eax, %ecx
1876 ; AVX-32-NEXT: movl (%ecx), %eax
1879 ; AVX-64-LABEL: test_f64_ule_q:
1881 ; AVX-64-NEXT: movl %edi, %eax
1882 ; AVX-64-NEXT: vucomisd %xmm1, %xmm0
1883 ; AVX-64-NEXT: cmoval %esi, %eax
1886 ; X87-LABEL: test_f64_ule_q:
1888 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1889 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1892 ; X87-NEXT: fnstsw %ax
1893 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
1895 ; X87-NEXT: jbe .LBB25_1
1896 ; X87-NEXT: # %bb.2:
1897 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1898 ; X87-NEXT: movl (%eax), %eax
1900 ; X87-NEXT: .LBB25_1:
1901 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1902 ; X87-NEXT: movl (%eax), %eax
1905 ; X87-CMOV-LABEL: test_f64_ule_q:
1906 ; X87-CMOV: # %bb.0:
1907 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1908 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1909 ; X87-CMOV-NEXT: fucompi %st(1), %st
1910 ; X87-CMOV-NEXT: fstp %st(0)
1911 ; X87-CMOV-NEXT: wait
1912 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
1913 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
1914 ; X87-CMOV-NEXT: cmovbel %eax, %ecx
1915 ; X87-CMOV-NEXT: movl (%ecx), %eax
1916 ; X87-CMOV-NEXT: retl
1917 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
1918 double %f1, double %f2, metadata !"ule",
1919 metadata !"fpexcept.strict") #0
1920 %res = select i1 %cond, i32 %a, i32 %b
1924 define i32 @test_f64_une_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
1925 ; SSE-32-LABEL: test_f64_une_q:
1927 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
1928 ; SSE-32-NEXT: ucomisd {{[0-9]+}}(%esp), %xmm0
1929 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1930 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1931 ; SSE-32-NEXT: cmovnel %eax, %ecx
1932 ; SSE-32-NEXT: cmovpl %eax, %ecx
1933 ; SSE-32-NEXT: movl (%ecx), %eax
1936 ; SSE-64-LABEL: test_f64_une_q:
1938 ; SSE-64-NEXT: movl %esi, %eax
1939 ; SSE-64-NEXT: ucomisd %xmm1, %xmm0
1940 ; SSE-64-NEXT: cmovnel %edi, %eax
1941 ; SSE-64-NEXT: cmovpl %edi, %eax
1944 ; AVX-32-LABEL: test_f64_une_q:
1946 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
1947 ; AVX-32-NEXT: vucomisd {{[0-9]+}}(%esp), %xmm0
1948 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
1949 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
1950 ; AVX-32-NEXT: cmovnel %eax, %ecx
1951 ; AVX-32-NEXT: cmovpl %eax, %ecx
1952 ; AVX-32-NEXT: movl (%ecx), %eax
1955 ; AVX-64-LABEL: test_f64_une_q:
1957 ; AVX-64-NEXT: movl %esi, %eax
1958 ; AVX-64-NEXT: vucomisd %xmm1, %xmm0
1959 ; AVX-64-NEXT: cmovnel %edi, %eax
1960 ; AVX-64-NEXT: cmovpl %edi, %eax
1963 ; X87-LABEL: test_f64_une_q:
1965 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1966 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
1969 ; X87-NEXT: fnstsw %ax
1970 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
1972 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1973 ; X87-NEXT: jne .LBB26_3
1974 ; X87-NEXT: # %bb.1:
1975 ; X87-NEXT: jp .LBB26_3
1976 ; X87-NEXT: # %bb.2:
1977 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
1978 ; X87-NEXT: .LBB26_3:
1979 ; X87-NEXT: movl (%eax), %eax
1982 ; X87-CMOV-LABEL: test_f64_une_q:
1983 ; X87-CMOV: # %bb.0:
1984 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1985 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
1986 ; X87-CMOV-NEXT: fucompi %st(1), %st
1987 ; X87-CMOV-NEXT: fstp %st(0)
1988 ; X87-CMOV-NEXT: wait
1989 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
1990 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
1991 ; X87-CMOV-NEXT: cmovnel %eax, %ecx
1992 ; X87-CMOV-NEXT: cmovpl %eax, %ecx
1993 ; X87-CMOV-NEXT: movl (%ecx), %eax
1994 ; X87-CMOV-NEXT: retl
1995 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
1996 double %f1, double %f2, metadata !"une",
1997 metadata !"fpexcept.strict") #0
1998 %res = select i1 %cond, i32 %a, i32 %b
2002 define i32 @test_f64_uno_q(i32 %a, i32 %b, double %f1, double %f2) #0 {
2003 ; SSE-32-LABEL: test_f64_uno_q:
2005 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2006 ; SSE-32-NEXT: ucomisd {{[0-9]+}}(%esp), %xmm0
2007 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2008 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2009 ; SSE-32-NEXT: cmovpl %eax, %ecx
2010 ; SSE-32-NEXT: movl (%ecx), %eax
2013 ; SSE-64-LABEL: test_f64_uno_q:
2015 ; SSE-64-NEXT: movl %edi, %eax
2016 ; SSE-64-NEXT: ucomisd %xmm1, %xmm0
2017 ; SSE-64-NEXT: cmovnpl %esi, %eax
2020 ; AVX-32-LABEL: test_f64_uno_q:
2022 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2023 ; AVX-32-NEXT: vucomisd {{[0-9]+}}(%esp), %xmm0
2024 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2025 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2026 ; AVX-32-NEXT: cmovpl %eax, %ecx
2027 ; AVX-32-NEXT: movl (%ecx), %eax
2030 ; AVX-64-LABEL: test_f64_uno_q:
2032 ; AVX-64-NEXT: movl %edi, %eax
2033 ; AVX-64-NEXT: vucomisd %xmm1, %xmm0
2034 ; AVX-64-NEXT: cmovnpl %esi, %eax
2037 ; X87-LABEL: test_f64_uno_q:
2039 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
2040 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
2043 ; X87-NEXT: fnstsw %ax
2044 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
2046 ; X87-NEXT: jp .LBB27_1
2047 ; X87-NEXT: # %bb.2:
2048 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2049 ; X87-NEXT: movl (%eax), %eax
2051 ; X87-NEXT: .LBB27_1:
2052 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2053 ; X87-NEXT: movl (%eax), %eax
2056 ; X87-CMOV-LABEL: test_f64_uno_q:
2057 ; X87-CMOV: # %bb.0:
2058 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
2059 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
2060 ; X87-CMOV-NEXT: fucompi %st(1), %st
2061 ; X87-CMOV-NEXT: fstp %st(0)
2062 ; X87-CMOV-NEXT: wait
2063 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
2064 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
2065 ; X87-CMOV-NEXT: cmovpl %eax, %ecx
2066 ; X87-CMOV-NEXT: movl (%ecx), %eax
2067 ; X87-CMOV-NEXT: retl
2068 %cond = call i1 @llvm.experimental.constrained.fcmp.f64(
2069 double %f1, double %f2, metadata !"uno",
2070 metadata !"fpexcept.strict") #0
2071 %res = select i1 %cond, i32 %a, i32 %b
2075 define i32 @test_f32_oeq_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
2076 ; SSE-32-LABEL: test_f32_oeq_s:
2078 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2079 ; SSE-32-NEXT: comiss {{[0-9]+}}(%esp), %xmm0
2080 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2081 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2082 ; SSE-32-NEXT: cmovnel %eax, %ecx
2083 ; SSE-32-NEXT: cmovpl %eax, %ecx
2084 ; SSE-32-NEXT: movl (%ecx), %eax
2087 ; SSE-64-LABEL: test_f32_oeq_s:
2089 ; SSE-64-NEXT: movl %edi, %eax
2090 ; SSE-64-NEXT: comiss %xmm1, %xmm0
2091 ; SSE-64-NEXT: cmovnel %esi, %eax
2092 ; SSE-64-NEXT: cmovpl %esi, %eax
2095 ; AVX-32-LABEL: test_f32_oeq_s:
2097 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2098 ; AVX-32-NEXT: vcomiss {{[0-9]+}}(%esp), %xmm0
2099 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2100 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2101 ; AVX-32-NEXT: cmovnel %eax, %ecx
2102 ; AVX-32-NEXT: cmovpl %eax, %ecx
2103 ; AVX-32-NEXT: movl (%ecx), %eax
2106 ; AVX-64-LABEL: test_f32_oeq_s:
2108 ; AVX-64-NEXT: movl %edi, %eax
2109 ; AVX-64-NEXT: vcomiss %xmm1, %xmm0
2110 ; AVX-64-NEXT: cmovnel %esi, %eax
2111 ; AVX-64-NEXT: cmovpl %esi, %eax
2114 ; X87-LABEL: test_f32_oeq_s:
2116 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2117 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2120 ; X87-NEXT: fnstsw %ax
2121 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
2123 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2124 ; X87-NEXT: jne .LBB28_3
2125 ; X87-NEXT: # %bb.1:
2126 ; X87-NEXT: jp .LBB28_3
2127 ; X87-NEXT: # %bb.2:
2128 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2129 ; X87-NEXT: .LBB28_3:
2130 ; X87-NEXT: movl (%eax), %eax
2133 ; X87-CMOV-LABEL: test_f32_oeq_s:
2134 ; X87-CMOV: # %bb.0:
2135 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2136 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2137 ; X87-CMOV-NEXT: fcompi %st(1), %st
2138 ; X87-CMOV-NEXT: fstp %st(0)
2139 ; X87-CMOV-NEXT: wait
2140 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
2141 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
2142 ; X87-CMOV-NEXT: cmovnel %eax, %ecx
2143 ; X87-CMOV-NEXT: cmovpl %eax, %ecx
2144 ; X87-CMOV-NEXT: movl (%ecx), %eax
2145 ; X87-CMOV-NEXT: retl
2146 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
2147 float %f1, float %f2, metadata !"oeq",
2148 metadata !"fpexcept.strict") #0
2149 %res = select i1 %cond, i32 %a, i32 %b
2153 define i32 @test_f32_ogt_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
2154 ; SSE-32-LABEL: test_f32_ogt_s:
2156 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2157 ; SSE-32-NEXT: comiss {{[0-9]+}}(%esp), %xmm0
2158 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2159 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2160 ; SSE-32-NEXT: cmoval %eax, %ecx
2161 ; SSE-32-NEXT: movl (%ecx), %eax
2164 ; SSE-64-LABEL: test_f32_ogt_s:
2166 ; SSE-64-NEXT: movl %edi, %eax
2167 ; SSE-64-NEXT: comiss %xmm1, %xmm0
2168 ; SSE-64-NEXT: cmovbel %esi, %eax
2171 ; AVX-32-LABEL: test_f32_ogt_s:
2173 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2174 ; AVX-32-NEXT: vcomiss {{[0-9]+}}(%esp), %xmm0
2175 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2176 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2177 ; AVX-32-NEXT: cmoval %eax, %ecx
2178 ; AVX-32-NEXT: movl (%ecx), %eax
2181 ; AVX-64-LABEL: test_f32_ogt_s:
2183 ; AVX-64-NEXT: movl %edi, %eax
2184 ; AVX-64-NEXT: vcomiss %xmm1, %xmm0
2185 ; AVX-64-NEXT: cmovbel %esi, %eax
2188 ; X87-LABEL: test_f32_ogt_s:
2190 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2191 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2194 ; X87-NEXT: fnstsw %ax
2195 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
2197 ; X87-NEXT: ja .LBB29_1
2198 ; X87-NEXT: # %bb.2:
2199 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2200 ; X87-NEXT: movl (%eax), %eax
2202 ; X87-NEXT: .LBB29_1:
2203 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2204 ; X87-NEXT: movl (%eax), %eax
2207 ; X87-CMOV-LABEL: test_f32_ogt_s:
2208 ; X87-CMOV: # %bb.0:
2209 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2210 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2211 ; X87-CMOV-NEXT: fcompi %st(1), %st
2212 ; X87-CMOV-NEXT: fstp %st(0)
2213 ; X87-CMOV-NEXT: wait
2214 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
2215 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
2216 ; X87-CMOV-NEXT: cmoval %eax, %ecx
2217 ; X87-CMOV-NEXT: movl (%ecx), %eax
2218 ; X87-CMOV-NEXT: retl
2219 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
2220 float %f1, float %f2, metadata !"ogt",
2221 metadata !"fpexcept.strict") #0
2222 %res = select i1 %cond, i32 %a, i32 %b
2226 define i32 @test_f32_oge_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
2227 ; SSE-32-LABEL: test_f32_oge_s:
2229 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2230 ; SSE-32-NEXT: comiss {{[0-9]+}}(%esp), %xmm0
2231 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2232 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2233 ; SSE-32-NEXT: cmovael %eax, %ecx
2234 ; SSE-32-NEXT: movl (%ecx), %eax
2237 ; SSE-64-LABEL: test_f32_oge_s:
2239 ; SSE-64-NEXT: movl %edi, %eax
2240 ; SSE-64-NEXT: comiss %xmm1, %xmm0
2241 ; SSE-64-NEXT: cmovbl %esi, %eax
2244 ; AVX-32-LABEL: test_f32_oge_s:
2246 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2247 ; AVX-32-NEXT: vcomiss {{[0-9]+}}(%esp), %xmm0
2248 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2249 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2250 ; AVX-32-NEXT: cmovael %eax, %ecx
2251 ; AVX-32-NEXT: movl (%ecx), %eax
2254 ; AVX-64-LABEL: test_f32_oge_s:
2256 ; AVX-64-NEXT: movl %edi, %eax
2257 ; AVX-64-NEXT: vcomiss %xmm1, %xmm0
2258 ; AVX-64-NEXT: cmovbl %esi, %eax
2261 ; X87-LABEL: test_f32_oge_s:
2263 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2264 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2267 ; X87-NEXT: fnstsw %ax
2268 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
2270 ; X87-NEXT: jae .LBB30_1
2271 ; X87-NEXT: # %bb.2:
2272 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2273 ; X87-NEXT: movl (%eax), %eax
2275 ; X87-NEXT: .LBB30_1:
2276 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2277 ; X87-NEXT: movl (%eax), %eax
2280 ; X87-CMOV-LABEL: test_f32_oge_s:
2281 ; X87-CMOV: # %bb.0:
2282 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2283 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2284 ; X87-CMOV-NEXT: fcompi %st(1), %st
2285 ; X87-CMOV-NEXT: fstp %st(0)
2286 ; X87-CMOV-NEXT: wait
2287 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
2288 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
2289 ; X87-CMOV-NEXT: cmovael %eax, %ecx
2290 ; X87-CMOV-NEXT: movl (%ecx), %eax
2291 ; X87-CMOV-NEXT: retl
2292 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
2293 float %f1, float %f2, metadata !"oge",
2294 metadata !"fpexcept.strict") #0
2295 %res = select i1 %cond, i32 %a, i32 %b
2299 define i32 @test_f32_olt_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
2300 ; SSE-32-LABEL: test_f32_olt_s:
2302 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2303 ; SSE-32-NEXT: comiss {{[0-9]+}}(%esp), %xmm0
2304 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2305 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2306 ; SSE-32-NEXT: cmoval %eax, %ecx
2307 ; SSE-32-NEXT: movl (%ecx), %eax
2310 ; SSE-64-LABEL: test_f32_olt_s:
2312 ; SSE-64-NEXT: movl %edi, %eax
2313 ; SSE-64-NEXT: comiss %xmm0, %xmm1
2314 ; SSE-64-NEXT: cmovbel %esi, %eax
2317 ; AVX-32-LABEL: test_f32_olt_s:
2319 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2320 ; AVX-32-NEXT: vcomiss {{[0-9]+}}(%esp), %xmm0
2321 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2322 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2323 ; AVX-32-NEXT: cmoval %eax, %ecx
2324 ; AVX-32-NEXT: movl (%ecx), %eax
2327 ; AVX-64-LABEL: test_f32_olt_s:
2329 ; AVX-64-NEXT: movl %edi, %eax
2330 ; AVX-64-NEXT: vcomiss %xmm0, %xmm1
2331 ; AVX-64-NEXT: cmovbel %esi, %eax
2334 ; X87-LABEL: test_f32_olt_s:
2336 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2337 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2340 ; X87-NEXT: fnstsw %ax
2341 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
2343 ; X87-NEXT: ja .LBB31_1
2344 ; X87-NEXT: # %bb.2:
2345 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2346 ; X87-NEXT: movl (%eax), %eax
2348 ; X87-NEXT: .LBB31_1:
2349 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2350 ; X87-NEXT: movl (%eax), %eax
2353 ; X87-CMOV-LABEL: test_f32_olt_s:
2354 ; X87-CMOV: # %bb.0:
2355 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2356 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2357 ; X87-CMOV-NEXT: fcompi %st(1), %st
2358 ; X87-CMOV-NEXT: fstp %st(0)
2359 ; X87-CMOV-NEXT: wait
2360 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
2361 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
2362 ; X87-CMOV-NEXT: cmoval %eax, %ecx
2363 ; X87-CMOV-NEXT: movl (%ecx), %eax
2364 ; X87-CMOV-NEXT: retl
2365 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
2366 float %f1, float %f2, metadata !"olt",
2367 metadata !"fpexcept.strict") #0
2368 %res = select i1 %cond, i32 %a, i32 %b
2372 define i32 @test_f32_ole_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
2373 ; SSE-32-LABEL: test_f32_ole_s:
2375 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2376 ; SSE-32-NEXT: comiss {{[0-9]+}}(%esp), %xmm0
2377 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2378 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2379 ; SSE-32-NEXT: cmovael %eax, %ecx
2380 ; SSE-32-NEXT: movl (%ecx), %eax
2383 ; SSE-64-LABEL: test_f32_ole_s:
2385 ; SSE-64-NEXT: movl %edi, %eax
2386 ; SSE-64-NEXT: comiss %xmm0, %xmm1
2387 ; SSE-64-NEXT: cmovbl %esi, %eax
2390 ; AVX-32-LABEL: test_f32_ole_s:
2392 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2393 ; AVX-32-NEXT: vcomiss {{[0-9]+}}(%esp), %xmm0
2394 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2395 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2396 ; AVX-32-NEXT: cmovael %eax, %ecx
2397 ; AVX-32-NEXT: movl (%ecx), %eax
2400 ; AVX-64-LABEL: test_f32_ole_s:
2402 ; AVX-64-NEXT: movl %edi, %eax
2403 ; AVX-64-NEXT: vcomiss %xmm0, %xmm1
2404 ; AVX-64-NEXT: cmovbl %esi, %eax
2407 ; X87-LABEL: test_f32_ole_s:
2409 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2410 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2413 ; X87-NEXT: fnstsw %ax
2414 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
2416 ; X87-NEXT: jae .LBB32_1
2417 ; X87-NEXT: # %bb.2:
2418 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2419 ; X87-NEXT: movl (%eax), %eax
2421 ; X87-NEXT: .LBB32_1:
2422 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2423 ; X87-NEXT: movl (%eax), %eax
2426 ; X87-CMOV-LABEL: test_f32_ole_s:
2427 ; X87-CMOV: # %bb.0:
2428 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2429 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2430 ; X87-CMOV-NEXT: fcompi %st(1), %st
2431 ; X87-CMOV-NEXT: fstp %st(0)
2432 ; X87-CMOV-NEXT: wait
2433 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
2434 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
2435 ; X87-CMOV-NEXT: cmovael %eax, %ecx
2436 ; X87-CMOV-NEXT: movl (%ecx), %eax
2437 ; X87-CMOV-NEXT: retl
2438 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
2439 float %f1, float %f2, metadata !"ole",
2440 metadata !"fpexcept.strict") #0
2441 %res = select i1 %cond, i32 %a, i32 %b
2445 define i32 @test_f32_one_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
2446 ; SSE-32-LABEL: test_f32_one_s:
2448 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2449 ; SSE-32-NEXT: comiss {{[0-9]+}}(%esp), %xmm0
2450 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2451 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2452 ; SSE-32-NEXT: cmovnel %eax, %ecx
2453 ; SSE-32-NEXT: movl (%ecx), %eax
2456 ; SSE-64-LABEL: test_f32_one_s:
2458 ; SSE-64-NEXT: movl %edi, %eax
2459 ; SSE-64-NEXT: comiss %xmm1, %xmm0
2460 ; SSE-64-NEXT: cmovel %esi, %eax
2463 ; AVX-32-LABEL: test_f32_one_s:
2465 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2466 ; AVX-32-NEXT: vcomiss {{[0-9]+}}(%esp), %xmm0
2467 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2468 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2469 ; AVX-32-NEXT: cmovnel %eax, %ecx
2470 ; AVX-32-NEXT: movl (%ecx), %eax
2473 ; AVX-64-LABEL: test_f32_one_s:
2475 ; AVX-64-NEXT: movl %edi, %eax
2476 ; AVX-64-NEXT: vcomiss %xmm1, %xmm0
2477 ; AVX-64-NEXT: cmovel %esi, %eax
2480 ; X87-LABEL: test_f32_one_s:
2482 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2483 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2486 ; X87-NEXT: fnstsw %ax
2487 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
2489 ; X87-NEXT: jne .LBB33_1
2490 ; X87-NEXT: # %bb.2:
2491 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2492 ; X87-NEXT: movl (%eax), %eax
2494 ; X87-NEXT: .LBB33_1:
2495 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2496 ; X87-NEXT: movl (%eax), %eax
2499 ; X87-CMOV-LABEL: test_f32_one_s:
2500 ; X87-CMOV: # %bb.0:
2501 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2502 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2503 ; X87-CMOV-NEXT: fcompi %st(1), %st
2504 ; X87-CMOV-NEXT: fstp %st(0)
2505 ; X87-CMOV-NEXT: wait
2506 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
2507 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
2508 ; X87-CMOV-NEXT: cmovnel %eax, %ecx
2509 ; X87-CMOV-NEXT: movl (%ecx), %eax
2510 ; X87-CMOV-NEXT: retl
2511 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
2512 float %f1, float %f2, metadata !"one",
2513 metadata !"fpexcept.strict") #0
2514 %res = select i1 %cond, i32 %a, i32 %b
2518 define i32 @test_f32_ord_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
2519 ; SSE-32-LABEL: test_f32_ord_s:
2521 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2522 ; SSE-32-NEXT: comiss {{[0-9]+}}(%esp), %xmm0
2523 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2524 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2525 ; SSE-32-NEXT: cmovnpl %eax, %ecx
2526 ; SSE-32-NEXT: movl (%ecx), %eax
2529 ; SSE-64-LABEL: test_f32_ord_s:
2531 ; SSE-64-NEXT: movl %edi, %eax
2532 ; SSE-64-NEXT: comiss %xmm1, %xmm0
2533 ; SSE-64-NEXT: cmovpl %esi, %eax
2536 ; AVX-32-LABEL: test_f32_ord_s:
2538 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2539 ; AVX-32-NEXT: vcomiss {{[0-9]+}}(%esp), %xmm0
2540 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2541 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2542 ; AVX-32-NEXT: cmovnpl %eax, %ecx
2543 ; AVX-32-NEXT: movl (%ecx), %eax
2546 ; AVX-64-LABEL: test_f32_ord_s:
2548 ; AVX-64-NEXT: movl %edi, %eax
2549 ; AVX-64-NEXT: vcomiss %xmm1, %xmm0
2550 ; AVX-64-NEXT: cmovpl %esi, %eax
2553 ; X87-LABEL: test_f32_ord_s:
2555 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2556 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2559 ; X87-NEXT: fnstsw %ax
2560 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
2562 ; X87-NEXT: jnp .LBB34_1
2563 ; X87-NEXT: # %bb.2:
2564 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2565 ; X87-NEXT: movl (%eax), %eax
2567 ; X87-NEXT: .LBB34_1:
2568 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2569 ; X87-NEXT: movl (%eax), %eax
2572 ; X87-CMOV-LABEL: test_f32_ord_s:
2573 ; X87-CMOV: # %bb.0:
2574 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2575 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2576 ; X87-CMOV-NEXT: fcompi %st(1), %st
2577 ; X87-CMOV-NEXT: fstp %st(0)
2578 ; X87-CMOV-NEXT: wait
2579 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
2580 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
2581 ; X87-CMOV-NEXT: cmovnpl %eax, %ecx
2582 ; X87-CMOV-NEXT: movl (%ecx), %eax
2583 ; X87-CMOV-NEXT: retl
2584 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
2585 float %f1, float %f2, metadata !"ord",
2586 metadata !"fpexcept.strict") #0
2587 %res = select i1 %cond, i32 %a, i32 %b
2591 define i32 @test_f32_ueq_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
2592 ; SSE-32-LABEL: test_f32_ueq_s:
2594 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2595 ; SSE-32-NEXT: comiss {{[0-9]+}}(%esp), %xmm0
2596 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2597 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2598 ; SSE-32-NEXT: cmovel %eax, %ecx
2599 ; SSE-32-NEXT: movl (%ecx), %eax
2602 ; SSE-64-LABEL: test_f32_ueq_s:
2604 ; SSE-64-NEXT: movl %edi, %eax
2605 ; SSE-64-NEXT: comiss %xmm1, %xmm0
2606 ; SSE-64-NEXT: cmovnel %esi, %eax
2609 ; AVX-32-LABEL: test_f32_ueq_s:
2611 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2612 ; AVX-32-NEXT: vcomiss {{[0-9]+}}(%esp), %xmm0
2613 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2614 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2615 ; AVX-32-NEXT: cmovel %eax, %ecx
2616 ; AVX-32-NEXT: movl (%ecx), %eax
2619 ; AVX-64-LABEL: test_f32_ueq_s:
2621 ; AVX-64-NEXT: movl %edi, %eax
2622 ; AVX-64-NEXT: vcomiss %xmm1, %xmm0
2623 ; AVX-64-NEXT: cmovnel %esi, %eax
2626 ; X87-LABEL: test_f32_ueq_s:
2628 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2629 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2632 ; X87-NEXT: fnstsw %ax
2633 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
2635 ; X87-NEXT: je .LBB35_1
2636 ; X87-NEXT: # %bb.2:
2637 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2638 ; X87-NEXT: movl (%eax), %eax
2640 ; X87-NEXT: .LBB35_1:
2641 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2642 ; X87-NEXT: movl (%eax), %eax
2645 ; X87-CMOV-LABEL: test_f32_ueq_s:
2646 ; X87-CMOV: # %bb.0:
2647 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2648 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2649 ; X87-CMOV-NEXT: fcompi %st(1), %st
2650 ; X87-CMOV-NEXT: fstp %st(0)
2651 ; X87-CMOV-NEXT: wait
2652 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
2653 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
2654 ; X87-CMOV-NEXT: cmovel %eax, %ecx
2655 ; X87-CMOV-NEXT: movl (%ecx), %eax
2656 ; X87-CMOV-NEXT: retl
2657 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
2658 float %f1, float %f2, metadata !"ueq",
2659 metadata !"fpexcept.strict") #0
2660 %res = select i1 %cond, i32 %a, i32 %b
2664 define i32 @test_f32_ugt_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
2665 ; SSE-32-LABEL: test_f32_ugt_s:
2667 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2668 ; SSE-32-NEXT: comiss {{[0-9]+}}(%esp), %xmm0
2669 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2670 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2671 ; SSE-32-NEXT: cmovbl %eax, %ecx
2672 ; SSE-32-NEXT: movl (%ecx), %eax
2675 ; SSE-64-LABEL: test_f32_ugt_s:
2677 ; SSE-64-NEXT: movl %edi, %eax
2678 ; SSE-64-NEXT: comiss %xmm0, %xmm1
2679 ; SSE-64-NEXT: cmovael %esi, %eax
2682 ; AVX-32-LABEL: test_f32_ugt_s:
2684 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2685 ; AVX-32-NEXT: vcomiss {{[0-9]+}}(%esp), %xmm0
2686 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2687 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2688 ; AVX-32-NEXT: cmovbl %eax, %ecx
2689 ; AVX-32-NEXT: movl (%ecx), %eax
2692 ; AVX-64-LABEL: test_f32_ugt_s:
2694 ; AVX-64-NEXT: movl %edi, %eax
2695 ; AVX-64-NEXT: vcomiss %xmm0, %xmm1
2696 ; AVX-64-NEXT: cmovael %esi, %eax
2699 ; X87-LABEL: test_f32_ugt_s:
2701 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2702 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2705 ; X87-NEXT: fnstsw %ax
2706 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
2708 ; X87-NEXT: jb .LBB36_1
2709 ; X87-NEXT: # %bb.2:
2710 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2711 ; X87-NEXT: movl (%eax), %eax
2713 ; X87-NEXT: .LBB36_1:
2714 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2715 ; X87-NEXT: movl (%eax), %eax
2718 ; X87-CMOV-LABEL: test_f32_ugt_s:
2719 ; X87-CMOV: # %bb.0:
2720 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2721 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2722 ; X87-CMOV-NEXT: fcompi %st(1), %st
2723 ; X87-CMOV-NEXT: fstp %st(0)
2724 ; X87-CMOV-NEXT: wait
2725 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
2726 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
2727 ; X87-CMOV-NEXT: cmovbl %eax, %ecx
2728 ; X87-CMOV-NEXT: movl (%ecx), %eax
2729 ; X87-CMOV-NEXT: retl
2730 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
2731 float %f1, float %f2, metadata !"ugt",
2732 metadata !"fpexcept.strict") #0
2733 %res = select i1 %cond, i32 %a, i32 %b
2737 define i32 @test_f32_uge_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
2738 ; SSE-32-LABEL: test_f32_uge_s:
2740 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2741 ; SSE-32-NEXT: comiss {{[0-9]+}}(%esp), %xmm0
2742 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2743 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2744 ; SSE-32-NEXT: cmovbel %eax, %ecx
2745 ; SSE-32-NEXT: movl (%ecx), %eax
2748 ; SSE-64-LABEL: test_f32_uge_s:
2750 ; SSE-64-NEXT: movl %edi, %eax
2751 ; SSE-64-NEXT: comiss %xmm0, %xmm1
2752 ; SSE-64-NEXT: cmoval %esi, %eax
2755 ; AVX-32-LABEL: test_f32_uge_s:
2757 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2758 ; AVX-32-NEXT: vcomiss {{[0-9]+}}(%esp), %xmm0
2759 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2760 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2761 ; AVX-32-NEXT: cmovbel %eax, %ecx
2762 ; AVX-32-NEXT: movl (%ecx), %eax
2765 ; AVX-64-LABEL: test_f32_uge_s:
2767 ; AVX-64-NEXT: movl %edi, %eax
2768 ; AVX-64-NEXT: vcomiss %xmm0, %xmm1
2769 ; AVX-64-NEXT: cmoval %esi, %eax
2772 ; X87-LABEL: test_f32_uge_s:
2774 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2775 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2778 ; X87-NEXT: fnstsw %ax
2779 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
2781 ; X87-NEXT: jbe .LBB37_1
2782 ; X87-NEXT: # %bb.2:
2783 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2784 ; X87-NEXT: movl (%eax), %eax
2786 ; X87-NEXT: .LBB37_1:
2787 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2788 ; X87-NEXT: movl (%eax), %eax
2791 ; X87-CMOV-LABEL: test_f32_uge_s:
2792 ; X87-CMOV: # %bb.0:
2793 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2794 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2795 ; X87-CMOV-NEXT: fcompi %st(1), %st
2796 ; X87-CMOV-NEXT: fstp %st(0)
2797 ; X87-CMOV-NEXT: wait
2798 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
2799 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
2800 ; X87-CMOV-NEXT: cmovbel %eax, %ecx
2801 ; X87-CMOV-NEXT: movl (%ecx), %eax
2802 ; X87-CMOV-NEXT: retl
2803 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
2804 float %f1, float %f2, metadata !"uge",
2805 metadata !"fpexcept.strict") #0
2806 %res = select i1 %cond, i32 %a, i32 %b
2810 define i32 @test_f32_ult_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
2811 ; SSE-32-LABEL: test_f32_ult_s:
2813 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2814 ; SSE-32-NEXT: comiss {{[0-9]+}}(%esp), %xmm0
2815 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2816 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2817 ; SSE-32-NEXT: cmovbl %eax, %ecx
2818 ; SSE-32-NEXT: movl (%ecx), %eax
2821 ; SSE-64-LABEL: test_f32_ult_s:
2823 ; SSE-64-NEXT: movl %edi, %eax
2824 ; SSE-64-NEXT: comiss %xmm1, %xmm0
2825 ; SSE-64-NEXT: cmovael %esi, %eax
2828 ; AVX-32-LABEL: test_f32_ult_s:
2830 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2831 ; AVX-32-NEXT: vcomiss {{[0-9]+}}(%esp), %xmm0
2832 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2833 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2834 ; AVX-32-NEXT: cmovbl %eax, %ecx
2835 ; AVX-32-NEXT: movl (%ecx), %eax
2838 ; AVX-64-LABEL: test_f32_ult_s:
2840 ; AVX-64-NEXT: movl %edi, %eax
2841 ; AVX-64-NEXT: vcomiss %xmm1, %xmm0
2842 ; AVX-64-NEXT: cmovael %esi, %eax
2845 ; X87-LABEL: test_f32_ult_s:
2847 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2848 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2851 ; X87-NEXT: fnstsw %ax
2852 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
2854 ; X87-NEXT: jb .LBB38_1
2855 ; X87-NEXT: # %bb.2:
2856 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2857 ; X87-NEXT: movl (%eax), %eax
2859 ; X87-NEXT: .LBB38_1:
2860 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2861 ; X87-NEXT: movl (%eax), %eax
2864 ; X87-CMOV-LABEL: test_f32_ult_s:
2865 ; X87-CMOV: # %bb.0:
2866 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2867 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2868 ; X87-CMOV-NEXT: fcompi %st(1), %st
2869 ; X87-CMOV-NEXT: fstp %st(0)
2870 ; X87-CMOV-NEXT: wait
2871 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
2872 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
2873 ; X87-CMOV-NEXT: cmovbl %eax, %ecx
2874 ; X87-CMOV-NEXT: movl (%ecx), %eax
2875 ; X87-CMOV-NEXT: retl
2876 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
2877 float %f1, float %f2, metadata !"ult",
2878 metadata !"fpexcept.strict") #0
2879 %res = select i1 %cond, i32 %a, i32 %b
2883 define i32 @test_f32_ule_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
2884 ; SSE-32-LABEL: test_f32_ule_s:
2886 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2887 ; SSE-32-NEXT: comiss {{[0-9]+}}(%esp), %xmm0
2888 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2889 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2890 ; SSE-32-NEXT: cmovbel %eax, %ecx
2891 ; SSE-32-NEXT: movl (%ecx), %eax
2894 ; SSE-64-LABEL: test_f32_ule_s:
2896 ; SSE-64-NEXT: movl %edi, %eax
2897 ; SSE-64-NEXT: comiss %xmm1, %xmm0
2898 ; SSE-64-NEXT: cmoval %esi, %eax
2901 ; AVX-32-LABEL: test_f32_ule_s:
2903 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2904 ; AVX-32-NEXT: vcomiss {{[0-9]+}}(%esp), %xmm0
2905 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2906 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2907 ; AVX-32-NEXT: cmovbel %eax, %ecx
2908 ; AVX-32-NEXT: movl (%ecx), %eax
2911 ; AVX-64-LABEL: test_f32_ule_s:
2913 ; AVX-64-NEXT: movl %edi, %eax
2914 ; AVX-64-NEXT: vcomiss %xmm1, %xmm0
2915 ; AVX-64-NEXT: cmoval %esi, %eax
2918 ; X87-LABEL: test_f32_ule_s:
2920 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2921 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2924 ; X87-NEXT: fnstsw %ax
2925 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
2927 ; X87-NEXT: jbe .LBB39_1
2928 ; X87-NEXT: # %bb.2:
2929 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2930 ; X87-NEXT: movl (%eax), %eax
2932 ; X87-NEXT: .LBB39_1:
2933 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
2934 ; X87-NEXT: movl (%eax), %eax
2937 ; X87-CMOV-LABEL: test_f32_ule_s:
2938 ; X87-CMOV: # %bb.0:
2939 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2940 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
2941 ; X87-CMOV-NEXT: fcompi %st(1), %st
2942 ; X87-CMOV-NEXT: fstp %st(0)
2943 ; X87-CMOV-NEXT: wait
2944 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
2945 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
2946 ; X87-CMOV-NEXT: cmovbel %eax, %ecx
2947 ; X87-CMOV-NEXT: movl (%ecx), %eax
2948 ; X87-CMOV-NEXT: retl
2949 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
2950 float %f1, float %f2, metadata !"ule",
2951 metadata !"fpexcept.strict") #0
2952 %res = select i1 %cond, i32 %a, i32 %b
2956 define i32 @test_f32_une_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
2957 ; SSE-32-LABEL: test_f32_une_s:
2959 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2960 ; SSE-32-NEXT: comiss {{[0-9]+}}(%esp), %xmm0
2961 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2962 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2963 ; SSE-32-NEXT: cmovnel %eax, %ecx
2964 ; SSE-32-NEXT: cmovpl %eax, %ecx
2965 ; SSE-32-NEXT: movl (%ecx), %eax
2968 ; SSE-64-LABEL: test_f32_une_s:
2970 ; SSE-64-NEXT: movl %esi, %eax
2971 ; SSE-64-NEXT: comiss %xmm1, %xmm0
2972 ; SSE-64-NEXT: cmovnel %edi, %eax
2973 ; SSE-64-NEXT: cmovpl %edi, %eax
2976 ; AVX-32-LABEL: test_f32_une_s:
2978 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
2979 ; AVX-32-NEXT: vcomiss {{[0-9]+}}(%esp), %xmm0
2980 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
2981 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
2982 ; AVX-32-NEXT: cmovnel %eax, %ecx
2983 ; AVX-32-NEXT: cmovpl %eax, %ecx
2984 ; AVX-32-NEXT: movl (%ecx), %eax
2987 ; AVX-64-LABEL: test_f32_une_s:
2989 ; AVX-64-NEXT: movl %esi, %eax
2990 ; AVX-64-NEXT: vcomiss %xmm1, %xmm0
2991 ; AVX-64-NEXT: cmovnel %edi, %eax
2992 ; AVX-64-NEXT: cmovpl %edi, %eax
2995 ; X87-LABEL: test_f32_une_s:
2997 ; X87-NEXT: flds {{[0-9]+}}(%esp)
2998 ; X87-NEXT: flds {{[0-9]+}}(%esp)
3001 ; X87-NEXT: fnstsw %ax
3002 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
3004 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3005 ; X87-NEXT: jne .LBB40_3
3006 ; X87-NEXT: # %bb.1:
3007 ; X87-NEXT: jp .LBB40_3
3008 ; X87-NEXT: # %bb.2:
3009 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3010 ; X87-NEXT: .LBB40_3:
3011 ; X87-NEXT: movl (%eax), %eax
3014 ; X87-CMOV-LABEL: test_f32_une_s:
3015 ; X87-CMOV: # %bb.0:
3016 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
3017 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
3018 ; X87-CMOV-NEXT: fcompi %st(1), %st
3019 ; X87-CMOV-NEXT: fstp %st(0)
3020 ; X87-CMOV-NEXT: wait
3021 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
3022 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
3023 ; X87-CMOV-NEXT: cmovnel %eax, %ecx
3024 ; X87-CMOV-NEXT: cmovpl %eax, %ecx
3025 ; X87-CMOV-NEXT: movl (%ecx), %eax
3026 ; X87-CMOV-NEXT: retl
3027 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
3028 float %f1, float %f2, metadata !"une",
3029 metadata !"fpexcept.strict") #0
3030 %res = select i1 %cond, i32 %a, i32 %b
3034 define i32 @test_f32_uno_s(i32 %a, i32 %b, float %f1, float %f2) #0 {
3035 ; SSE-32-LABEL: test_f32_uno_s:
3037 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3038 ; SSE-32-NEXT: comiss {{[0-9]+}}(%esp), %xmm0
3039 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3040 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3041 ; SSE-32-NEXT: cmovpl %eax, %ecx
3042 ; SSE-32-NEXT: movl (%ecx), %eax
3045 ; SSE-64-LABEL: test_f32_uno_s:
3047 ; SSE-64-NEXT: movl %edi, %eax
3048 ; SSE-64-NEXT: comiss %xmm1, %xmm0
3049 ; SSE-64-NEXT: cmovnpl %esi, %eax
3052 ; AVX-32-LABEL: test_f32_uno_s:
3054 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
3055 ; AVX-32-NEXT: vcomiss {{[0-9]+}}(%esp), %xmm0
3056 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3057 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3058 ; AVX-32-NEXT: cmovpl %eax, %ecx
3059 ; AVX-32-NEXT: movl (%ecx), %eax
3062 ; AVX-64-LABEL: test_f32_uno_s:
3064 ; AVX-64-NEXT: movl %edi, %eax
3065 ; AVX-64-NEXT: vcomiss %xmm1, %xmm0
3066 ; AVX-64-NEXT: cmovnpl %esi, %eax
3069 ; X87-LABEL: test_f32_uno_s:
3071 ; X87-NEXT: flds {{[0-9]+}}(%esp)
3072 ; X87-NEXT: flds {{[0-9]+}}(%esp)
3075 ; X87-NEXT: fnstsw %ax
3076 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
3078 ; X87-NEXT: jp .LBB41_1
3079 ; X87-NEXT: # %bb.2:
3080 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3081 ; X87-NEXT: movl (%eax), %eax
3083 ; X87-NEXT: .LBB41_1:
3084 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3085 ; X87-NEXT: movl (%eax), %eax
3088 ; X87-CMOV-LABEL: test_f32_uno_s:
3089 ; X87-CMOV: # %bb.0:
3090 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
3091 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
3092 ; X87-CMOV-NEXT: fcompi %st(1), %st
3093 ; X87-CMOV-NEXT: fstp %st(0)
3094 ; X87-CMOV-NEXT: wait
3095 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
3096 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
3097 ; X87-CMOV-NEXT: cmovpl %eax, %ecx
3098 ; X87-CMOV-NEXT: movl (%ecx), %eax
3099 ; X87-CMOV-NEXT: retl
3100 %cond = call i1 @llvm.experimental.constrained.fcmps.f32(
3101 float %f1, float %f2, metadata !"uno",
3102 metadata !"fpexcept.strict") #0
3103 %res = select i1 %cond, i32 %a, i32 %b
3107 define i32 @test_f64_oeq_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
3108 ; SSE-32-LABEL: test_f64_oeq_s:
3110 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3111 ; SSE-32-NEXT: comisd {{[0-9]+}}(%esp), %xmm0
3112 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3113 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3114 ; SSE-32-NEXT: cmovnel %eax, %ecx
3115 ; SSE-32-NEXT: cmovpl %eax, %ecx
3116 ; SSE-32-NEXT: movl (%ecx), %eax
3119 ; SSE-64-LABEL: test_f64_oeq_s:
3121 ; SSE-64-NEXT: movl %edi, %eax
3122 ; SSE-64-NEXT: comisd %xmm1, %xmm0
3123 ; SSE-64-NEXT: cmovnel %esi, %eax
3124 ; SSE-64-NEXT: cmovpl %esi, %eax
3127 ; AVX-32-LABEL: test_f64_oeq_s:
3129 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3130 ; AVX-32-NEXT: vcomisd {{[0-9]+}}(%esp), %xmm0
3131 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3132 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3133 ; AVX-32-NEXT: cmovnel %eax, %ecx
3134 ; AVX-32-NEXT: cmovpl %eax, %ecx
3135 ; AVX-32-NEXT: movl (%ecx), %eax
3138 ; AVX-64-LABEL: test_f64_oeq_s:
3140 ; AVX-64-NEXT: movl %edi, %eax
3141 ; AVX-64-NEXT: vcomisd %xmm1, %xmm0
3142 ; AVX-64-NEXT: cmovnel %esi, %eax
3143 ; AVX-64-NEXT: cmovpl %esi, %eax
3146 ; X87-LABEL: test_f64_oeq_s:
3148 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3149 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3152 ; X87-NEXT: fnstsw %ax
3153 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
3155 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3156 ; X87-NEXT: jne .LBB42_3
3157 ; X87-NEXT: # %bb.1:
3158 ; X87-NEXT: jp .LBB42_3
3159 ; X87-NEXT: # %bb.2:
3160 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3161 ; X87-NEXT: .LBB42_3:
3162 ; X87-NEXT: movl (%eax), %eax
3165 ; X87-CMOV-LABEL: test_f64_oeq_s:
3166 ; X87-CMOV: # %bb.0:
3167 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3168 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3169 ; X87-CMOV-NEXT: fcompi %st(1), %st
3170 ; X87-CMOV-NEXT: fstp %st(0)
3171 ; X87-CMOV-NEXT: wait
3172 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
3173 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
3174 ; X87-CMOV-NEXT: cmovnel %eax, %ecx
3175 ; X87-CMOV-NEXT: cmovpl %eax, %ecx
3176 ; X87-CMOV-NEXT: movl (%ecx), %eax
3177 ; X87-CMOV-NEXT: retl
3178 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
3179 double %f1, double %f2, metadata !"oeq",
3180 metadata !"fpexcept.strict") #0
3181 %res = select i1 %cond, i32 %a, i32 %b
3185 define i32 @test_f64_ogt_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
3186 ; SSE-32-LABEL: test_f64_ogt_s:
3188 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3189 ; SSE-32-NEXT: comisd {{[0-9]+}}(%esp), %xmm0
3190 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3191 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3192 ; SSE-32-NEXT: cmoval %eax, %ecx
3193 ; SSE-32-NEXT: movl (%ecx), %eax
3196 ; SSE-64-LABEL: test_f64_ogt_s:
3198 ; SSE-64-NEXT: movl %edi, %eax
3199 ; SSE-64-NEXT: comisd %xmm1, %xmm0
3200 ; SSE-64-NEXT: cmovbel %esi, %eax
3203 ; AVX-32-LABEL: test_f64_ogt_s:
3205 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3206 ; AVX-32-NEXT: vcomisd {{[0-9]+}}(%esp), %xmm0
3207 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3208 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3209 ; AVX-32-NEXT: cmoval %eax, %ecx
3210 ; AVX-32-NEXT: movl (%ecx), %eax
3213 ; AVX-64-LABEL: test_f64_ogt_s:
3215 ; AVX-64-NEXT: movl %edi, %eax
3216 ; AVX-64-NEXT: vcomisd %xmm1, %xmm0
3217 ; AVX-64-NEXT: cmovbel %esi, %eax
3220 ; X87-LABEL: test_f64_ogt_s:
3222 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3223 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3226 ; X87-NEXT: fnstsw %ax
3227 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
3229 ; X87-NEXT: ja .LBB43_1
3230 ; X87-NEXT: # %bb.2:
3231 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3232 ; X87-NEXT: movl (%eax), %eax
3234 ; X87-NEXT: .LBB43_1:
3235 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3236 ; X87-NEXT: movl (%eax), %eax
3239 ; X87-CMOV-LABEL: test_f64_ogt_s:
3240 ; X87-CMOV: # %bb.0:
3241 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3242 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3243 ; X87-CMOV-NEXT: fcompi %st(1), %st
3244 ; X87-CMOV-NEXT: fstp %st(0)
3245 ; X87-CMOV-NEXT: wait
3246 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
3247 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
3248 ; X87-CMOV-NEXT: cmoval %eax, %ecx
3249 ; X87-CMOV-NEXT: movl (%ecx), %eax
3250 ; X87-CMOV-NEXT: retl
3251 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
3252 double %f1, double %f2, metadata !"ogt",
3253 metadata !"fpexcept.strict") #0
3254 %res = select i1 %cond, i32 %a, i32 %b
3258 define i32 @test_f64_oge_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
3259 ; SSE-32-LABEL: test_f64_oge_s:
3261 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3262 ; SSE-32-NEXT: comisd {{[0-9]+}}(%esp), %xmm0
3263 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3264 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3265 ; SSE-32-NEXT: cmovael %eax, %ecx
3266 ; SSE-32-NEXT: movl (%ecx), %eax
3269 ; SSE-64-LABEL: test_f64_oge_s:
3271 ; SSE-64-NEXT: movl %edi, %eax
3272 ; SSE-64-NEXT: comisd %xmm1, %xmm0
3273 ; SSE-64-NEXT: cmovbl %esi, %eax
3276 ; AVX-32-LABEL: test_f64_oge_s:
3278 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3279 ; AVX-32-NEXT: vcomisd {{[0-9]+}}(%esp), %xmm0
3280 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3281 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3282 ; AVX-32-NEXT: cmovael %eax, %ecx
3283 ; AVX-32-NEXT: movl (%ecx), %eax
3286 ; AVX-64-LABEL: test_f64_oge_s:
3288 ; AVX-64-NEXT: movl %edi, %eax
3289 ; AVX-64-NEXT: vcomisd %xmm1, %xmm0
3290 ; AVX-64-NEXT: cmovbl %esi, %eax
3293 ; X87-LABEL: test_f64_oge_s:
3295 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3296 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3299 ; X87-NEXT: fnstsw %ax
3300 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
3302 ; X87-NEXT: jae .LBB44_1
3303 ; X87-NEXT: # %bb.2:
3304 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3305 ; X87-NEXT: movl (%eax), %eax
3307 ; X87-NEXT: .LBB44_1:
3308 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3309 ; X87-NEXT: movl (%eax), %eax
3312 ; X87-CMOV-LABEL: test_f64_oge_s:
3313 ; X87-CMOV: # %bb.0:
3314 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3315 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3316 ; X87-CMOV-NEXT: fcompi %st(1), %st
3317 ; X87-CMOV-NEXT: fstp %st(0)
3318 ; X87-CMOV-NEXT: wait
3319 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
3320 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
3321 ; X87-CMOV-NEXT: cmovael %eax, %ecx
3322 ; X87-CMOV-NEXT: movl (%ecx), %eax
3323 ; X87-CMOV-NEXT: retl
3324 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
3325 double %f1, double %f2, metadata !"oge",
3326 metadata !"fpexcept.strict") #0
3327 %res = select i1 %cond, i32 %a, i32 %b
3331 define i32 @test_f64_olt_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
3332 ; SSE-32-LABEL: test_f64_olt_s:
3334 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3335 ; SSE-32-NEXT: comisd {{[0-9]+}}(%esp), %xmm0
3336 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3337 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3338 ; SSE-32-NEXT: cmoval %eax, %ecx
3339 ; SSE-32-NEXT: movl (%ecx), %eax
3342 ; SSE-64-LABEL: test_f64_olt_s:
3344 ; SSE-64-NEXT: movl %edi, %eax
3345 ; SSE-64-NEXT: comisd %xmm0, %xmm1
3346 ; SSE-64-NEXT: cmovbel %esi, %eax
3349 ; AVX-32-LABEL: test_f64_olt_s:
3351 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3352 ; AVX-32-NEXT: vcomisd {{[0-9]+}}(%esp), %xmm0
3353 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3354 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3355 ; AVX-32-NEXT: cmoval %eax, %ecx
3356 ; AVX-32-NEXT: movl (%ecx), %eax
3359 ; AVX-64-LABEL: test_f64_olt_s:
3361 ; AVX-64-NEXT: movl %edi, %eax
3362 ; AVX-64-NEXT: vcomisd %xmm0, %xmm1
3363 ; AVX-64-NEXT: cmovbel %esi, %eax
3366 ; X87-LABEL: test_f64_olt_s:
3368 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3369 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3372 ; X87-NEXT: fnstsw %ax
3373 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
3375 ; X87-NEXT: ja .LBB45_1
3376 ; X87-NEXT: # %bb.2:
3377 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3378 ; X87-NEXT: movl (%eax), %eax
3380 ; X87-NEXT: .LBB45_1:
3381 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3382 ; X87-NEXT: movl (%eax), %eax
3385 ; X87-CMOV-LABEL: test_f64_olt_s:
3386 ; X87-CMOV: # %bb.0:
3387 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3388 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3389 ; X87-CMOV-NEXT: fcompi %st(1), %st
3390 ; X87-CMOV-NEXT: fstp %st(0)
3391 ; X87-CMOV-NEXT: wait
3392 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
3393 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
3394 ; X87-CMOV-NEXT: cmoval %eax, %ecx
3395 ; X87-CMOV-NEXT: movl (%ecx), %eax
3396 ; X87-CMOV-NEXT: retl
3397 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
3398 double %f1, double %f2, metadata !"olt",
3399 metadata !"fpexcept.strict") #0
3400 %res = select i1 %cond, i32 %a, i32 %b
3404 define i32 @test_f64_ole_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
3405 ; SSE-32-LABEL: test_f64_ole_s:
3407 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3408 ; SSE-32-NEXT: comisd {{[0-9]+}}(%esp), %xmm0
3409 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3410 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3411 ; SSE-32-NEXT: cmovael %eax, %ecx
3412 ; SSE-32-NEXT: movl (%ecx), %eax
3415 ; SSE-64-LABEL: test_f64_ole_s:
3417 ; SSE-64-NEXT: movl %edi, %eax
3418 ; SSE-64-NEXT: comisd %xmm0, %xmm1
3419 ; SSE-64-NEXT: cmovbl %esi, %eax
3422 ; AVX-32-LABEL: test_f64_ole_s:
3424 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3425 ; AVX-32-NEXT: vcomisd {{[0-9]+}}(%esp), %xmm0
3426 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3427 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3428 ; AVX-32-NEXT: cmovael %eax, %ecx
3429 ; AVX-32-NEXT: movl (%ecx), %eax
3432 ; AVX-64-LABEL: test_f64_ole_s:
3434 ; AVX-64-NEXT: movl %edi, %eax
3435 ; AVX-64-NEXT: vcomisd %xmm0, %xmm1
3436 ; AVX-64-NEXT: cmovbl %esi, %eax
3439 ; X87-LABEL: test_f64_ole_s:
3441 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3442 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3445 ; X87-NEXT: fnstsw %ax
3446 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
3448 ; X87-NEXT: jae .LBB46_1
3449 ; X87-NEXT: # %bb.2:
3450 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3451 ; X87-NEXT: movl (%eax), %eax
3453 ; X87-NEXT: .LBB46_1:
3454 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3455 ; X87-NEXT: movl (%eax), %eax
3458 ; X87-CMOV-LABEL: test_f64_ole_s:
3459 ; X87-CMOV: # %bb.0:
3460 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3461 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3462 ; X87-CMOV-NEXT: fcompi %st(1), %st
3463 ; X87-CMOV-NEXT: fstp %st(0)
3464 ; X87-CMOV-NEXT: wait
3465 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
3466 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
3467 ; X87-CMOV-NEXT: cmovael %eax, %ecx
3468 ; X87-CMOV-NEXT: movl (%ecx), %eax
3469 ; X87-CMOV-NEXT: retl
3470 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
3471 double %f1, double %f2, metadata !"ole",
3472 metadata !"fpexcept.strict") #0
3473 %res = select i1 %cond, i32 %a, i32 %b
3477 define i32 @test_f64_one_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
3478 ; SSE-32-LABEL: test_f64_one_s:
3480 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3481 ; SSE-32-NEXT: comisd {{[0-9]+}}(%esp), %xmm0
3482 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3483 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3484 ; SSE-32-NEXT: cmovnel %eax, %ecx
3485 ; SSE-32-NEXT: movl (%ecx), %eax
3488 ; SSE-64-LABEL: test_f64_one_s:
3490 ; SSE-64-NEXT: movl %edi, %eax
3491 ; SSE-64-NEXT: comisd %xmm1, %xmm0
3492 ; SSE-64-NEXT: cmovel %esi, %eax
3495 ; AVX-32-LABEL: test_f64_one_s:
3497 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3498 ; AVX-32-NEXT: vcomisd {{[0-9]+}}(%esp), %xmm0
3499 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3500 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3501 ; AVX-32-NEXT: cmovnel %eax, %ecx
3502 ; AVX-32-NEXT: movl (%ecx), %eax
3505 ; AVX-64-LABEL: test_f64_one_s:
3507 ; AVX-64-NEXT: movl %edi, %eax
3508 ; AVX-64-NEXT: vcomisd %xmm1, %xmm0
3509 ; AVX-64-NEXT: cmovel %esi, %eax
3512 ; X87-LABEL: test_f64_one_s:
3514 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3515 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3518 ; X87-NEXT: fnstsw %ax
3519 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
3521 ; X87-NEXT: jne .LBB47_1
3522 ; X87-NEXT: # %bb.2:
3523 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3524 ; X87-NEXT: movl (%eax), %eax
3526 ; X87-NEXT: .LBB47_1:
3527 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3528 ; X87-NEXT: movl (%eax), %eax
3531 ; X87-CMOV-LABEL: test_f64_one_s:
3532 ; X87-CMOV: # %bb.0:
3533 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3534 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3535 ; X87-CMOV-NEXT: fcompi %st(1), %st
3536 ; X87-CMOV-NEXT: fstp %st(0)
3537 ; X87-CMOV-NEXT: wait
3538 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
3539 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
3540 ; X87-CMOV-NEXT: cmovnel %eax, %ecx
3541 ; X87-CMOV-NEXT: movl (%ecx), %eax
3542 ; X87-CMOV-NEXT: retl
3543 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
3544 double %f1, double %f2, metadata !"one",
3545 metadata !"fpexcept.strict") #0
3546 %res = select i1 %cond, i32 %a, i32 %b
3550 define i32 @test_f64_ord_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
3551 ; SSE-32-LABEL: test_f64_ord_s:
3553 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3554 ; SSE-32-NEXT: comisd {{[0-9]+}}(%esp), %xmm0
3555 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3556 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3557 ; SSE-32-NEXT: cmovnpl %eax, %ecx
3558 ; SSE-32-NEXT: movl (%ecx), %eax
3561 ; SSE-64-LABEL: test_f64_ord_s:
3563 ; SSE-64-NEXT: movl %edi, %eax
3564 ; SSE-64-NEXT: comisd %xmm1, %xmm0
3565 ; SSE-64-NEXT: cmovpl %esi, %eax
3568 ; AVX-32-LABEL: test_f64_ord_s:
3570 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3571 ; AVX-32-NEXT: vcomisd {{[0-9]+}}(%esp), %xmm0
3572 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3573 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3574 ; AVX-32-NEXT: cmovnpl %eax, %ecx
3575 ; AVX-32-NEXT: movl (%ecx), %eax
3578 ; AVX-64-LABEL: test_f64_ord_s:
3580 ; AVX-64-NEXT: movl %edi, %eax
3581 ; AVX-64-NEXT: vcomisd %xmm1, %xmm0
3582 ; AVX-64-NEXT: cmovpl %esi, %eax
3585 ; X87-LABEL: test_f64_ord_s:
3587 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3588 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3591 ; X87-NEXT: fnstsw %ax
3592 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
3594 ; X87-NEXT: jnp .LBB48_1
3595 ; X87-NEXT: # %bb.2:
3596 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3597 ; X87-NEXT: movl (%eax), %eax
3599 ; X87-NEXT: .LBB48_1:
3600 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3601 ; X87-NEXT: movl (%eax), %eax
3604 ; X87-CMOV-LABEL: test_f64_ord_s:
3605 ; X87-CMOV: # %bb.0:
3606 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3607 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3608 ; X87-CMOV-NEXT: fcompi %st(1), %st
3609 ; X87-CMOV-NEXT: fstp %st(0)
3610 ; X87-CMOV-NEXT: wait
3611 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
3612 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
3613 ; X87-CMOV-NEXT: cmovnpl %eax, %ecx
3614 ; X87-CMOV-NEXT: movl (%ecx), %eax
3615 ; X87-CMOV-NEXT: retl
3616 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
3617 double %f1, double %f2, metadata !"ord",
3618 metadata !"fpexcept.strict") #0
3619 %res = select i1 %cond, i32 %a, i32 %b
3623 define i32 @test_f64_ueq_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
3624 ; SSE-32-LABEL: test_f64_ueq_s:
3626 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3627 ; SSE-32-NEXT: comisd {{[0-9]+}}(%esp), %xmm0
3628 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3629 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3630 ; SSE-32-NEXT: cmovel %eax, %ecx
3631 ; SSE-32-NEXT: movl (%ecx), %eax
3634 ; SSE-64-LABEL: test_f64_ueq_s:
3636 ; SSE-64-NEXT: movl %edi, %eax
3637 ; SSE-64-NEXT: comisd %xmm1, %xmm0
3638 ; SSE-64-NEXT: cmovnel %esi, %eax
3641 ; AVX-32-LABEL: test_f64_ueq_s:
3643 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3644 ; AVX-32-NEXT: vcomisd {{[0-9]+}}(%esp), %xmm0
3645 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3646 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3647 ; AVX-32-NEXT: cmovel %eax, %ecx
3648 ; AVX-32-NEXT: movl (%ecx), %eax
3651 ; AVX-64-LABEL: test_f64_ueq_s:
3653 ; AVX-64-NEXT: movl %edi, %eax
3654 ; AVX-64-NEXT: vcomisd %xmm1, %xmm0
3655 ; AVX-64-NEXT: cmovnel %esi, %eax
3658 ; X87-LABEL: test_f64_ueq_s:
3660 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3661 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3664 ; X87-NEXT: fnstsw %ax
3665 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
3667 ; X87-NEXT: je .LBB49_1
3668 ; X87-NEXT: # %bb.2:
3669 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3670 ; X87-NEXT: movl (%eax), %eax
3672 ; X87-NEXT: .LBB49_1:
3673 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3674 ; X87-NEXT: movl (%eax), %eax
3677 ; X87-CMOV-LABEL: test_f64_ueq_s:
3678 ; X87-CMOV: # %bb.0:
3679 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3680 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3681 ; X87-CMOV-NEXT: fcompi %st(1), %st
3682 ; X87-CMOV-NEXT: fstp %st(0)
3683 ; X87-CMOV-NEXT: wait
3684 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
3685 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
3686 ; X87-CMOV-NEXT: cmovel %eax, %ecx
3687 ; X87-CMOV-NEXT: movl (%ecx), %eax
3688 ; X87-CMOV-NEXT: retl
3689 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
3690 double %f1, double %f2, metadata !"ueq",
3691 metadata !"fpexcept.strict") #0
3692 %res = select i1 %cond, i32 %a, i32 %b
3696 define i32 @test_f64_ugt_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
3697 ; SSE-32-LABEL: test_f64_ugt_s:
3699 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3700 ; SSE-32-NEXT: comisd {{[0-9]+}}(%esp), %xmm0
3701 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3702 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3703 ; SSE-32-NEXT: cmovbl %eax, %ecx
3704 ; SSE-32-NEXT: movl (%ecx), %eax
3707 ; SSE-64-LABEL: test_f64_ugt_s:
3709 ; SSE-64-NEXT: movl %edi, %eax
3710 ; SSE-64-NEXT: comisd %xmm0, %xmm1
3711 ; SSE-64-NEXT: cmovael %esi, %eax
3714 ; AVX-32-LABEL: test_f64_ugt_s:
3716 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3717 ; AVX-32-NEXT: vcomisd {{[0-9]+}}(%esp), %xmm0
3718 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3719 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3720 ; AVX-32-NEXT: cmovbl %eax, %ecx
3721 ; AVX-32-NEXT: movl (%ecx), %eax
3724 ; AVX-64-LABEL: test_f64_ugt_s:
3726 ; AVX-64-NEXT: movl %edi, %eax
3727 ; AVX-64-NEXT: vcomisd %xmm0, %xmm1
3728 ; AVX-64-NEXT: cmovael %esi, %eax
3731 ; X87-LABEL: test_f64_ugt_s:
3733 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3734 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3737 ; X87-NEXT: fnstsw %ax
3738 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
3740 ; X87-NEXT: jb .LBB50_1
3741 ; X87-NEXT: # %bb.2:
3742 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3743 ; X87-NEXT: movl (%eax), %eax
3745 ; X87-NEXT: .LBB50_1:
3746 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3747 ; X87-NEXT: movl (%eax), %eax
3750 ; X87-CMOV-LABEL: test_f64_ugt_s:
3751 ; X87-CMOV: # %bb.0:
3752 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3753 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3754 ; X87-CMOV-NEXT: fcompi %st(1), %st
3755 ; X87-CMOV-NEXT: fstp %st(0)
3756 ; X87-CMOV-NEXT: wait
3757 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
3758 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
3759 ; X87-CMOV-NEXT: cmovbl %eax, %ecx
3760 ; X87-CMOV-NEXT: movl (%ecx), %eax
3761 ; X87-CMOV-NEXT: retl
3762 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
3763 double %f1, double %f2, metadata !"ugt",
3764 metadata !"fpexcept.strict") #0
3765 %res = select i1 %cond, i32 %a, i32 %b
3769 define i32 @test_f64_uge_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
3770 ; SSE-32-LABEL: test_f64_uge_s:
3772 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3773 ; SSE-32-NEXT: comisd {{[0-9]+}}(%esp), %xmm0
3774 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3775 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3776 ; SSE-32-NEXT: cmovbel %eax, %ecx
3777 ; SSE-32-NEXT: movl (%ecx), %eax
3780 ; SSE-64-LABEL: test_f64_uge_s:
3782 ; SSE-64-NEXT: movl %edi, %eax
3783 ; SSE-64-NEXT: comisd %xmm0, %xmm1
3784 ; SSE-64-NEXT: cmoval %esi, %eax
3787 ; AVX-32-LABEL: test_f64_uge_s:
3789 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3790 ; AVX-32-NEXT: vcomisd {{[0-9]+}}(%esp), %xmm0
3791 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3792 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3793 ; AVX-32-NEXT: cmovbel %eax, %ecx
3794 ; AVX-32-NEXT: movl (%ecx), %eax
3797 ; AVX-64-LABEL: test_f64_uge_s:
3799 ; AVX-64-NEXT: movl %edi, %eax
3800 ; AVX-64-NEXT: vcomisd %xmm0, %xmm1
3801 ; AVX-64-NEXT: cmoval %esi, %eax
3804 ; X87-LABEL: test_f64_uge_s:
3806 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3807 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3810 ; X87-NEXT: fnstsw %ax
3811 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
3813 ; X87-NEXT: jbe .LBB51_1
3814 ; X87-NEXT: # %bb.2:
3815 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3816 ; X87-NEXT: movl (%eax), %eax
3818 ; X87-NEXT: .LBB51_1:
3819 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3820 ; X87-NEXT: movl (%eax), %eax
3823 ; X87-CMOV-LABEL: test_f64_uge_s:
3824 ; X87-CMOV: # %bb.0:
3825 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3826 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3827 ; X87-CMOV-NEXT: fcompi %st(1), %st
3828 ; X87-CMOV-NEXT: fstp %st(0)
3829 ; X87-CMOV-NEXT: wait
3830 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
3831 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
3832 ; X87-CMOV-NEXT: cmovbel %eax, %ecx
3833 ; X87-CMOV-NEXT: movl (%ecx), %eax
3834 ; X87-CMOV-NEXT: retl
3835 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
3836 double %f1, double %f2, metadata !"uge",
3837 metadata !"fpexcept.strict") #0
3838 %res = select i1 %cond, i32 %a, i32 %b
3842 define i32 @test_f64_ult_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
3843 ; SSE-32-LABEL: test_f64_ult_s:
3845 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3846 ; SSE-32-NEXT: comisd {{[0-9]+}}(%esp), %xmm0
3847 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3848 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3849 ; SSE-32-NEXT: cmovbl %eax, %ecx
3850 ; SSE-32-NEXT: movl (%ecx), %eax
3853 ; SSE-64-LABEL: test_f64_ult_s:
3855 ; SSE-64-NEXT: movl %edi, %eax
3856 ; SSE-64-NEXT: comisd %xmm1, %xmm0
3857 ; SSE-64-NEXT: cmovael %esi, %eax
3860 ; AVX-32-LABEL: test_f64_ult_s:
3862 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3863 ; AVX-32-NEXT: vcomisd {{[0-9]+}}(%esp), %xmm0
3864 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3865 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3866 ; AVX-32-NEXT: cmovbl %eax, %ecx
3867 ; AVX-32-NEXT: movl (%ecx), %eax
3870 ; AVX-64-LABEL: test_f64_ult_s:
3872 ; AVX-64-NEXT: movl %edi, %eax
3873 ; AVX-64-NEXT: vcomisd %xmm1, %xmm0
3874 ; AVX-64-NEXT: cmovael %esi, %eax
3877 ; X87-LABEL: test_f64_ult_s:
3879 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3880 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3883 ; X87-NEXT: fnstsw %ax
3884 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
3886 ; X87-NEXT: jb .LBB52_1
3887 ; X87-NEXT: # %bb.2:
3888 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3889 ; X87-NEXT: movl (%eax), %eax
3891 ; X87-NEXT: .LBB52_1:
3892 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3893 ; X87-NEXT: movl (%eax), %eax
3896 ; X87-CMOV-LABEL: test_f64_ult_s:
3897 ; X87-CMOV: # %bb.0:
3898 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3899 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3900 ; X87-CMOV-NEXT: fcompi %st(1), %st
3901 ; X87-CMOV-NEXT: fstp %st(0)
3902 ; X87-CMOV-NEXT: wait
3903 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
3904 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
3905 ; X87-CMOV-NEXT: cmovbl %eax, %ecx
3906 ; X87-CMOV-NEXT: movl (%ecx), %eax
3907 ; X87-CMOV-NEXT: retl
3908 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
3909 double %f1, double %f2, metadata !"ult",
3910 metadata !"fpexcept.strict") #0
3911 %res = select i1 %cond, i32 %a, i32 %b
3915 define i32 @test_f64_ule_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
3916 ; SSE-32-LABEL: test_f64_ule_s:
3918 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3919 ; SSE-32-NEXT: comisd {{[0-9]+}}(%esp), %xmm0
3920 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3921 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3922 ; SSE-32-NEXT: cmovbel %eax, %ecx
3923 ; SSE-32-NEXT: movl (%ecx), %eax
3926 ; SSE-64-LABEL: test_f64_ule_s:
3928 ; SSE-64-NEXT: movl %edi, %eax
3929 ; SSE-64-NEXT: comisd %xmm1, %xmm0
3930 ; SSE-64-NEXT: cmoval %esi, %eax
3933 ; AVX-32-LABEL: test_f64_ule_s:
3935 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3936 ; AVX-32-NEXT: vcomisd {{[0-9]+}}(%esp), %xmm0
3937 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3938 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3939 ; AVX-32-NEXT: cmovbel %eax, %ecx
3940 ; AVX-32-NEXT: movl (%ecx), %eax
3943 ; AVX-64-LABEL: test_f64_ule_s:
3945 ; AVX-64-NEXT: movl %edi, %eax
3946 ; AVX-64-NEXT: vcomisd %xmm1, %xmm0
3947 ; AVX-64-NEXT: cmoval %esi, %eax
3950 ; X87-LABEL: test_f64_ule_s:
3952 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3953 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
3956 ; X87-NEXT: fnstsw %ax
3957 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
3959 ; X87-NEXT: jbe .LBB53_1
3960 ; X87-NEXT: # %bb.2:
3961 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3962 ; X87-NEXT: movl (%eax), %eax
3964 ; X87-NEXT: .LBB53_1:
3965 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
3966 ; X87-NEXT: movl (%eax), %eax
3969 ; X87-CMOV-LABEL: test_f64_ule_s:
3970 ; X87-CMOV: # %bb.0:
3971 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3972 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
3973 ; X87-CMOV-NEXT: fcompi %st(1), %st
3974 ; X87-CMOV-NEXT: fstp %st(0)
3975 ; X87-CMOV-NEXT: wait
3976 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
3977 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
3978 ; X87-CMOV-NEXT: cmovbel %eax, %ecx
3979 ; X87-CMOV-NEXT: movl (%ecx), %eax
3980 ; X87-CMOV-NEXT: retl
3981 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
3982 double %f1, double %f2, metadata !"ule",
3983 metadata !"fpexcept.strict") #0
3984 %res = select i1 %cond, i32 %a, i32 %b
3988 define i32 @test_f64_une_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
3989 ; SSE-32-LABEL: test_f64_une_s:
3991 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
3992 ; SSE-32-NEXT: comisd {{[0-9]+}}(%esp), %xmm0
3993 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
3994 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
3995 ; SSE-32-NEXT: cmovnel %eax, %ecx
3996 ; SSE-32-NEXT: cmovpl %eax, %ecx
3997 ; SSE-32-NEXT: movl (%ecx), %eax
4000 ; SSE-64-LABEL: test_f64_une_s:
4002 ; SSE-64-NEXT: movl %esi, %eax
4003 ; SSE-64-NEXT: comisd %xmm1, %xmm0
4004 ; SSE-64-NEXT: cmovnel %edi, %eax
4005 ; SSE-64-NEXT: cmovpl %edi, %eax
4008 ; AVX-32-LABEL: test_f64_une_s:
4010 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
4011 ; AVX-32-NEXT: vcomisd {{[0-9]+}}(%esp), %xmm0
4012 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
4013 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
4014 ; AVX-32-NEXT: cmovnel %eax, %ecx
4015 ; AVX-32-NEXT: cmovpl %eax, %ecx
4016 ; AVX-32-NEXT: movl (%ecx), %eax
4019 ; AVX-64-LABEL: test_f64_une_s:
4021 ; AVX-64-NEXT: movl %esi, %eax
4022 ; AVX-64-NEXT: vcomisd %xmm1, %xmm0
4023 ; AVX-64-NEXT: cmovnel %edi, %eax
4024 ; AVX-64-NEXT: cmovpl %edi, %eax
4027 ; X87-LABEL: test_f64_une_s:
4029 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
4030 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
4033 ; X87-NEXT: fnstsw %ax
4034 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
4036 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
4037 ; X87-NEXT: jne .LBB54_3
4038 ; X87-NEXT: # %bb.1:
4039 ; X87-NEXT: jp .LBB54_3
4040 ; X87-NEXT: # %bb.2:
4041 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
4042 ; X87-NEXT: .LBB54_3:
4043 ; X87-NEXT: movl (%eax), %eax
4046 ; X87-CMOV-LABEL: test_f64_une_s:
4047 ; X87-CMOV: # %bb.0:
4048 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
4049 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
4050 ; X87-CMOV-NEXT: fcompi %st(1), %st
4051 ; X87-CMOV-NEXT: fstp %st(0)
4052 ; X87-CMOV-NEXT: wait
4053 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
4054 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
4055 ; X87-CMOV-NEXT: cmovnel %eax, %ecx
4056 ; X87-CMOV-NEXT: cmovpl %eax, %ecx
4057 ; X87-CMOV-NEXT: movl (%ecx), %eax
4058 ; X87-CMOV-NEXT: retl
4059 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
4060 double %f1, double %f2, metadata !"une",
4061 metadata !"fpexcept.strict") #0
4062 %res = select i1 %cond, i32 %a, i32 %b
4066 define i32 @test_f64_uno_s(i32 %a, i32 %b, double %f1, double %f2) #0 {
4067 ; SSE-32-LABEL: test_f64_uno_s:
4069 ; SSE-32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
4070 ; SSE-32-NEXT: comisd {{[0-9]+}}(%esp), %xmm0
4071 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %eax
4072 ; SSE-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
4073 ; SSE-32-NEXT: cmovpl %eax, %ecx
4074 ; SSE-32-NEXT: movl (%ecx), %eax
4077 ; SSE-64-LABEL: test_f64_uno_s:
4079 ; SSE-64-NEXT: movl %edi, %eax
4080 ; SSE-64-NEXT: comisd %xmm1, %xmm0
4081 ; SSE-64-NEXT: cmovnpl %esi, %eax
4084 ; AVX-32-LABEL: test_f64_uno_s:
4086 ; AVX-32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
4087 ; AVX-32-NEXT: vcomisd {{[0-9]+}}(%esp), %xmm0
4088 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %eax
4089 ; AVX-32-NEXT: leal {{[0-9]+}}(%esp), %ecx
4090 ; AVX-32-NEXT: cmovpl %eax, %ecx
4091 ; AVX-32-NEXT: movl (%ecx), %eax
4094 ; AVX-64-LABEL: test_f64_uno_s:
4096 ; AVX-64-NEXT: movl %edi, %eax
4097 ; AVX-64-NEXT: vcomisd %xmm1, %xmm0
4098 ; AVX-64-NEXT: cmovnpl %esi, %eax
4101 ; X87-LABEL: test_f64_uno_s:
4103 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
4104 ; X87-NEXT: fldl {{[0-9]+}}(%esp)
4107 ; X87-NEXT: fnstsw %ax
4108 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
4110 ; X87-NEXT: jp .LBB55_1
4111 ; X87-NEXT: # %bb.2:
4112 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
4113 ; X87-NEXT: movl (%eax), %eax
4115 ; X87-NEXT: .LBB55_1:
4116 ; X87-NEXT: leal {{[0-9]+}}(%esp), %eax
4117 ; X87-NEXT: movl (%eax), %eax
4120 ; X87-CMOV-LABEL: test_f64_uno_s:
4121 ; X87-CMOV: # %bb.0:
4122 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
4123 ; X87-CMOV-NEXT: fldl {{[0-9]+}}(%esp)
4124 ; X87-CMOV-NEXT: fcompi %st(1), %st
4125 ; X87-CMOV-NEXT: fstp %st(0)
4126 ; X87-CMOV-NEXT: wait
4127 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %eax
4128 ; X87-CMOV-NEXT: leal {{[0-9]+}}(%esp), %ecx
4129 ; X87-CMOV-NEXT: cmovpl %eax, %ecx
4130 ; X87-CMOV-NEXT: movl (%ecx), %eax
4131 ; X87-CMOV-NEXT: retl
4132 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
4133 double %f1, double %f2, metadata !"uno",
4134 metadata !"fpexcept.strict") #0
4135 %res = select i1 %cond, i32 %a, i32 %b
4139 define void @foo(float %0, float %1) #0 {
4140 ; SSE-32-LABEL: foo:
4142 ; SSE-32-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
4143 ; SSE-32-NEXT: ucomiss {{[0-9]+}}(%esp), %xmm0
4144 ; SSE-32-NEXT: ja bar # TAILCALL
4145 ; SSE-32-NEXT: # %bb.1:
4148 ; SSE-64-LABEL: foo:
4150 ; SSE-64-NEXT: ucomiss %xmm1, %xmm0
4151 ; SSE-64-NEXT: ja bar # TAILCALL
4152 ; SSE-64-NEXT: # %bb.1:
4155 ; AVX-32-LABEL: foo:
4157 ; AVX-32-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
4158 ; AVX-32-NEXT: vucomiss {{[0-9]+}}(%esp), %xmm0
4159 ; AVX-32-NEXT: ja bar # TAILCALL
4160 ; AVX-32-NEXT: # %bb.1:
4163 ; AVX-64-LABEL: foo:
4165 ; AVX-64-NEXT: vucomiss %xmm1, %xmm0
4166 ; AVX-64-NEXT: ja bar # TAILCALL
4167 ; AVX-64-NEXT: # %bb.1:
4172 ; X87-NEXT: flds {{[0-9]+}}(%esp)
4173 ; X87-NEXT: flds {{[0-9]+}}(%esp)
4176 ; X87-NEXT: fnstsw %ax
4177 ; X87-NEXT: # kill: def $ah killed $ah killed $ax
4179 ; X87-NEXT: ja bar # TAILCALL
4180 ; X87-NEXT: # %bb.1:
4183 ; X87-CMOV-LABEL: foo:
4184 ; X87-CMOV: # %bb.0:
4185 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
4186 ; X87-CMOV-NEXT: flds {{[0-9]+}}(%esp)
4187 ; X87-CMOV-NEXT: fucompi %st(1), %st
4188 ; X87-CMOV-NEXT: fstp %st(0)
4189 ; X87-CMOV-NEXT: wait
4190 ; X87-CMOV-NEXT: ja bar # TAILCALL
4191 ; X87-CMOV-NEXT: # %bb.1:
4192 ; X87-CMOV-NEXT: retl
4193 %3 = call i1 @llvm.experimental.constrained.fcmp.f32( float %0, float %1, metadata !"ogt", metadata !"fpexcept.strict") #0
4194 br i1 %3, label %4, label %5
4197 tail call void @bar() #0
4203 declare dso_local void @bar()
4205 attributes #0 = { strictfp }
4207 declare i1 @llvm.experimental.constrained.fcmp.f32(float, float, metadata, metadata)
4208 declare i1 @llvm.experimental.constrained.fcmp.f64(double, double, metadata, metadata)
4209 declare i1 @llvm.experimental.constrained.fcmps.f32(float, float, metadata, metadata)
4210 declare i1 @llvm.experimental.constrained.fcmps.f64(double, double, metadata, metadata)