1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=i686-- -mcpu pentium4 < %s | FileCheck %s -check-prefix=SSE
3 ; RUN: llc -mtriple=i686-- -mcpu pentium3 < %s | FileCheck %s -check-prefix=NOSSE2
4 ; RUN: llc -mtriple=i686-- -mcpu pentium2 < %s | FileCheck %s -check-prefix=NOSSE1
5 ; RUN: llc -mtriple=i686-- -mcpu pentium < %s | FileCheck %s -check-prefix=NOCMOV
8 define double @test1(i32 %a, i32 %b, double %x) nounwind {
11 ; SSE-NEXT: pushl %ebp
12 ; SSE-NEXT: movl %esp, %ebp
13 ; SSE-NEXT: andl $-8, %esp
14 ; SSE-NEXT: subl $8, %esp
15 ; SSE-NEXT: movl 8(%ebp), %eax
16 ; SSE-NEXT: cmpl 12(%ebp), %eax
17 ; SSE-NEXT: ja .LBB0_1
19 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
20 ; SSE-NEXT: jmp .LBB0_3
22 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
24 ; SSE-NEXT: movsd %xmm0, (%esp)
25 ; SSE-NEXT: fldl (%esp)
26 ; SSE-NEXT: movl %ebp, %esp
30 ; NOSSE2-LABEL: test1:
32 ; NOSSE2-NEXT: fldl {{[0-9]+}}(%esp)
33 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
34 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
35 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
36 ; NOSSE2-NEXT: fxch %st(1)
37 ; NOSSE2-NEXT: fcmovnbe %st(1), %st
38 ; NOSSE2-NEXT: fstp %st(1)
41 ; NOSSE1-LABEL: test1:
43 ; NOSSE1-NEXT: fldl {{[0-9]+}}(%esp)
44 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
45 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
46 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
47 ; NOSSE1-NEXT: fxch %st(1)
48 ; NOSSE1-NEXT: fcmovnbe %st(1), %st
49 ; NOSSE1-NEXT: fstp %st(1)
52 ; NOCMOV-LABEL: test1:
54 ; NOCMOV-NEXT: fldl {{[0-9]+}}(%esp)
55 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
56 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
57 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
58 ; NOCMOV-NEXT: ja .LBB0_2
59 ; NOCMOV-NEXT: # %bb.1:
60 ; NOCMOV-NEXT: fstp %st(0)
62 ; NOCMOV-NEXT: fxch %st(1)
63 ; NOCMOV-NEXT: .LBB0_2:
64 ; NOCMOV-NEXT: fstp %st(1)
66 %cmp = icmp ugt i32 %a, %b
67 %sel = select i1 %cmp, double 99.0, double %x
71 define double @test2(i32 %a, i32 %b, double %x) nounwind {
74 ; SSE-NEXT: pushl %ebp
75 ; SSE-NEXT: movl %esp, %ebp
76 ; SSE-NEXT: andl $-8, %esp
77 ; SSE-NEXT: subl $8, %esp
78 ; SSE-NEXT: movl 8(%ebp), %eax
79 ; SSE-NEXT: cmpl 12(%ebp), %eax
80 ; SSE-NEXT: jae .LBB1_1
82 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
83 ; SSE-NEXT: jmp .LBB1_3
85 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
87 ; SSE-NEXT: movsd %xmm0, (%esp)
88 ; SSE-NEXT: fldl (%esp)
89 ; SSE-NEXT: movl %ebp, %esp
93 ; NOSSE2-LABEL: test2:
95 ; NOSSE2-NEXT: fldl {{[0-9]+}}(%esp)
96 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
97 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
98 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
99 ; NOSSE2-NEXT: fxch %st(1)
100 ; NOSSE2-NEXT: fcmovnb %st(1), %st
101 ; NOSSE2-NEXT: fstp %st(1)
104 ; NOSSE1-LABEL: test2:
106 ; NOSSE1-NEXT: fldl {{[0-9]+}}(%esp)
107 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
108 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
109 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
110 ; NOSSE1-NEXT: fxch %st(1)
111 ; NOSSE1-NEXT: fcmovnb %st(1), %st
112 ; NOSSE1-NEXT: fstp %st(1)
115 ; NOCMOV-LABEL: test2:
117 ; NOCMOV-NEXT: fldl {{[0-9]+}}(%esp)
118 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
119 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
120 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
121 ; NOCMOV-NEXT: jae .LBB1_2
122 ; NOCMOV-NEXT: # %bb.1:
123 ; NOCMOV-NEXT: fstp %st(0)
125 ; NOCMOV-NEXT: fxch %st(1)
126 ; NOCMOV-NEXT: .LBB1_2:
127 ; NOCMOV-NEXT: fstp %st(1)
129 %cmp = icmp uge i32 %a, %b
130 %sel = select i1 %cmp, double 99.0, double %x
134 define double @test3(i32 %a, i32 %b, double %x) nounwind {
137 ; SSE-NEXT: pushl %ebp
138 ; SSE-NEXT: movl %esp, %ebp
139 ; SSE-NEXT: andl $-8, %esp
140 ; SSE-NEXT: subl $8, %esp
141 ; SSE-NEXT: movl 8(%ebp), %eax
142 ; SSE-NEXT: cmpl 12(%ebp), %eax
143 ; SSE-NEXT: jb .LBB2_1
145 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
146 ; SSE-NEXT: jmp .LBB2_3
148 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
150 ; SSE-NEXT: movsd %xmm0, (%esp)
151 ; SSE-NEXT: fldl (%esp)
152 ; SSE-NEXT: movl %ebp, %esp
153 ; SSE-NEXT: popl %ebp
156 ; NOSSE2-LABEL: test3:
158 ; NOSSE2-NEXT: fldl {{[0-9]+}}(%esp)
159 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
160 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
161 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
162 ; NOSSE2-NEXT: fxch %st(1)
163 ; NOSSE2-NEXT: fcmovb %st(1), %st
164 ; NOSSE2-NEXT: fstp %st(1)
167 ; NOSSE1-LABEL: test3:
169 ; NOSSE1-NEXT: fldl {{[0-9]+}}(%esp)
170 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
171 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
172 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
173 ; NOSSE1-NEXT: fxch %st(1)
174 ; NOSSE1-NEXT: fcmovb %st(1), %st
175 ; NOSSE1-NEXT: fstp %st(1)
178 ; NOCMOV-LABEL: test3:
180 ; NOCMOV-NEXT: fldl {{[0-9]+}}(%esp)
181 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
182 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
183 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
184 ; NOCMOV-NEXT: jb .LBB2_2
185 ; NOCMOV-NEXT: # %bb.1:
186 ; NOCMOV-NEXT: fstp %st(0)
188 ; NOCMOV-NEXT: fxch %st(1)
189 ; NOCMOV-NEXT: .LBB2_2:
190 ; NOCMOV-NEXT: fstp %st(1)
192 %cmp = icmp ult i32 %a, %b
193 %sel = select i1 %cmp, double 99.0, double %x
197 define double @test4(i32 %a, i32 %b, double %x) nounwind {
200 ; SSE-NEXT: pushl %ebp
201 ; SSE-NEXT: movl %esp, %ebp
202 ; SSE-NEXT: andl $-8, %esp
203 ; SSE-NEXT: subl $8, %esp
204 ; SSE-NEXT: movl 8(%ebp), %eax
205 ; SSE-NEXT: cmpl 12(%ebp), %eax
206 ; SSE-NEXT: jbe .LBB3_1
208 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
209 ; SSE-NEXT: jmp .LBB3_3
211 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
213 ; SSE-NEXT: movsd %xmm0, (%esp)
214 ; SSE-NEXT: fldl (%esp)
215 ; SSE-NEXT: movl %ebp, %esp
216 ; SSE-NEXT: popl %ebp
219 ; NOSSE2-LABEL: test4:
221 ; NOSSE2-NEXT: fldl {{[0-9]+}}(%esp)
222 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
223 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
224 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
225 ; NOSSE2-NEXT: fxch %st(1)
226 ; NOSSE2-NEXT: fcmovbe %st(1), %st
227 ; NOSSE2-NEXT: fstp %st(1)
230 ; NOSSE1-LABEL: test4:
232 ; NOSSE1-NEXT: fldl {{[0-9]+}}(%esp)
233 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
234 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
235 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
236 ; NOSSE1-NEXT: fxch %st(1)
237 ; NOSSE1-NEXT: fcmovbe %st(1), %st
238 ; NOSSE1-NEXT: fstp %st(1)
241 ; NOCMOV-LABEL: test4:
243 ; NOCMOV-NEXT: fldl {{[0-9]+}}(%esp)
244 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
245 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
246 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
247 ; NOCMOV-NEXT: jbe .LBB3_2
248 ; NOCMOV-NEXT: # %bb.1:
249 ; NOCMOV-NEXT: fstp %st(0)
251 ; NOCMOV-NEXT: fxch %st(1)
252 ; NOCMOV-NEXT: .LBB3_2:
253 ; NOCMOV-NEXT: fstp %st(1)
255 %cmp = icmp ule i32 %a, %b
256 %sel = select i1 %cmp, double 99.0, double %x
260 define double @test5(i32 %a, i32 %b, double %x) nounwind {
263 ; SSE-NEXT: pushl %ebp
264 ; SSE-NEXT: movl %esp, %ebp
265 ; SSE-NEXT: andl $-8, %esp
266 ; SSE-NEXT: subl $8, %esp
267 ; SSE-NEXT: movl 8(%ebp), %eax
268 ; SSE-NEXT: cmpl 12(%ebp), %eax
269 ; SSE-NEXT: jg .LBB4_1
271 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
272 ; SSE-NEXT: jmp .LBB4_3
274 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
276 ; SSE-NEXT: movsd %xmm0, (%esp)
277 ; SSE-NEXT: fldl (%esp)
278 ; SSE-NEXT: movl %ebp, %esp
279 ; SSE-NEXT: popl %ebp
282 ; NOSSE2-LABEL: test5:
284 ; NOSSE2-NEXT: fldl {{[0-9]+}}(%esp)
285 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
286 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
287 ; NOSSE2-NEXT: setg %al
288 ; NOSSE2-NEXT: testb %al, %al
289 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
290 ; NOSSE2-NEXT: fxch %st(1)
291 ; NOSSE2-NEXT: fcmovne %st(1), %st
292 ; NOSSE2-NEXT: fstp %st(1)
295 ; NOSSE1-LABEL: test5:
297 ; NOSSE1-NEXT: fldl {{[0-9]+}}(%esp)
298 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
299 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
300 ; NOSSE1-NEXT: setg %al
301 ; NOSSE1-NEXT: testb %al, %al
302 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
303 ; NOSSE1-NEXT: fxch %st(1)
304 ; NOSSE1-NEXT: fcmovne %st(1), %st
305 ; NOSSE1-NEXT: fstp %st(1)
308 ; NOCMOV-LABEL: test5:
310 ; NOCMOV-NEXT: fldl {{[0-9]+}}(%esp)
311 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
312 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
313 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
314 ; NOCMOV-NEXT: jg .LBB4_2
315 ; NOCMOV-NEXT: # %bb.1:
316 ; NOCMOV-NEXT: fstp %st(0)
318 ; NOCMOV-NEXT: fxch %st(1)
319 ; NOCMOV-NEXT: .LBB4_2:
320 ; NOCMOV-NEXT: fstp %st(1)
322 %cmp = icmp sgt i32 %a, %b
323 %sel = select i1 %cmp, double 99.0, double %x
327 define double @test6(i32 %a, i32 %b, double %x) nounwind {
330 ; SSE-NEXT: pushl %ebp
331 ; SSE-NEXT: movl %esp, %ebp
332 ; SSE-NEXT: andl $-8, %esp
333 ; SSE-NEXT: subl $8, %esp
334 ; SSE-NEXT: movl 8(%ebp), %eax
335 ; SSE-NEXT: cmpl 12(%ebp), %eax
336 ; SSE-NEXT: jge .LBB5_1
338 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
339 ; SSE-NEXT: jmp .LBB5_3
341 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
343 ; SSE-NEXT: movsd %xmm0, (%esp)
344 ; SSE-NEXT: fldl (%esp)
345 ; SSE-NEXT: movl %ebp, %esp
346 ; SSE-NEXT: popl %ebp
349 ; NOSSE2-LABEL: test6:
351 ; NOSSE2-NEXT: fldl {{[0-9]+}}(%esp)
352 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
353 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
354 ; NOSSE2-NEXT: setge %al
355 ; NOSSE2-NEXT: testb %al, %al
356 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
357 ; NOSSE2-NEXT: fxch %st(1)
358 ; NOSSE2-NEXT: fcmovne %st(1), %st
359 ; NOSSE2-NEXT: fstp %st(1)
362 ; NOSSE1-LABEL: test6:
364 ; NOSSE1-NEXT: fldl {{[0-9]+}}(%esp)
365 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
366 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
367 ; NOSSE1-NEXT: setge %al
368 ; NOSSE1-NEXT: testb %al, %al
369 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
370 ; NOSSE1-NEXT: fxch %st(1)
371 ; NOSSE1-NEXT: fcmovne %st(1), %st
372 ; NOSSE1-NEXT: fstp %st(1)
375 ; NOCMOV-LABEL: test6:
377 ; NOCMOV-NEXT: fldl {{[0-9]+}}(%esp)
378 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
379 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
380 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
381 ; NOCMOV-NEXT: jge .LBB5_2
382 ; NOCMOV-NEXT: # %bb.1:
383 ; NOCMOV-NEXT: fstp %st(0)
385 ; NOCMOV-NEXT: fxch %st(1)
386 ; NOCMOV-NEXT: .LBB5_2:
387 ; NOCMOV-NEXT: fstp %st(1)
389 %cmp = icmp sge i32 %a, %b
390 %sel = select i1 %cmp, double 99.0, double %x
394 define double @test7(i32 %a, i32 %b, double %x) nounwind {
397 ; SSE-NEXT: pushl %ebp
398 ; SSE-NEXT: movl %esp, %ebp
399 ; SSE-NEXT: andl $-8, %esp
400 ; SSE-NEXT: subl $8, %esp
401 ; SSE-NEXT: movl 8(%ebp), %eax
402 ; SSE-NEXT: cmpl 12(%ebp), %eax
403 ; SSE-NEXT: jl .LBB6_1
405 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
406 ; SSE-NEXT: jmp .LBB6_3
408 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
410 ; SSE-NEXT: movsd %xmm0, (%esp)
411 ; SSE-NEXT: fldl (%esp)
412 ; SSE-NEXT: movl %ebp, %esp
413 ; SSE-NEXT: popl %ebp
416 ; NOSSE2-LABEL: test7:
418 ; NOSSE2-NEXT: fldl {{[0-9]+}}(%esp)
419 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
420 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
421 ; NOSSE2-NEXT: setl %al
422 ; NOSSE2-NEXT: testb %al, %al
423 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
424 ; NOSSE2-NEXT: fxch %st(1)
425 ; NOSSE2-NEXT: fcmovne %st(1), %st
426 ; NOSSE2-NEXT: fstp %st(1)
429 ; NOSSE1-LABEL: test7:
431 ; NOSSE1-NEXT: fldl {{[0-9]+}}(%esp)
432 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
433 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
434 ; NOSSE1-NEXT: setl %al
435 ; NOSSE1-NEXT: testb %al, %al
436 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
437 ; NOSSE1-NEXT: fxch %st(1)
438 ; NOSSE1-NEXT: fcmovne %st(1), %st
439 ; NOSSE1-NEXT: fstp %st(1)
442 ; NOCMOV-LABEL: test7:
444 ; NOCMOV-NEXT: fldl {{[0-9]+}}(%esp)
445 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
446 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
447 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
448 ; NOCMOV-NEXT: jl .LBB6_2
449 ; NOCMOV-NEXT: # %bb.1:
450 ; NOCMOV-NEXT: fstp %st(0)
452 ; NOCMOV-NEXT: fxch %st(1)
453 ; NOCMOV-NEXT: .LBB6_2:
454 ; NOCMOV-NEXT: fstp %st(1)
456 %cmp = icmp slt i32 %a, %b
457 %sel = select i1 %cmp, double 99.0, double %x
461 define double @test8(i32 %a, i32 %b, double %x) nounwind {
464 ; SSE-NEXT: pushl %ebp
465 ; SSE-NEXT: movl %esp, %ebp
466 ; SSE-NEXT: andl $-8, %esp
467 ; SSE-NEXT: subl $8, %esp
468 ; SSE-NEXT: movl 8(%ebp), %eax
469 ; SSE-NEXT: cmpl 12(%ebp), %eax
470 ; SSE-NEXT: jle .LBB7_1
472 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
473 ; SSE-NEXT: jmp .LBB7_3
475 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
477 ; SSE-NEXT: movsd %xmm0, (%esp)
478 ; SSE-NEXT: fldl (%esp)
479 ; SSE-NEXT: movl %ebp, %esp
480 ; SSE-NEXT: popl %ebp
483 ; NOSSE2-LABEL: test8:
485 ; NOSSE2-NEXT: fldl {{[0-9]+}}(%esp)
486 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
487 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
488 ; NOSSE2-NEXT: setle %al
489 ; NOSSE2-NEXT: testb %al, %al
490 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
491 ; NOSSE2-NEXT: fxch %st(1)
492 ; NOSSE2-NEXT: fcmovne %st(1), %st
493 ; NOSSE2-NEXT: fstp %st(1)
496 ; NOSSE1-LABEL: test8:
498 ; NOSSE1-NEXT: fldl {{[0-9]+}}(%esp)
499 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
500 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
501 ; NOSSE1-NEXT: setle %al
502 ; NOSSE1-NEXT: testb %al, %al
503 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
504 ; NOSSE1-NEXT: fxch %st(1)
505 ; NOSSE1-NEXT: fcmovne %st(1), %st
506 ; NOSSE1-NEXT: fstp %st(1)
509 ; NOCMOV-LABEL: test8:
511 ; NOCMOV-NEXT: fldl {{[0-9]+}}(%esp)
512 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
513 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
514 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
515 ; NOCMOV-NEXT: jle .LBB7_2
516 ; NOCMOV-NEXT: # %bb.1:
517 ; NOCMOV-NEXT: fstp %st(0)
519 ; NOCMOV-NEXT: fxch %st(1)
520 ; NOCMOV-NEXT: .LBB7_2:
521 ; NOCMOV-NEXT: fstp %st(1)
523 %cmp = icmp sle i32 %a, %b
524 %sel = select i1 %cmp, double 99.0, double %x
528 define float @test9(i32 %a, i32 %b, float %x) nounwind {
531 ; SSE-NEXT: pushl %eax
532 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
533 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
534 ; SSE-NEXT: ja .LBB8_1
536 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
537 ; SSE-NEXT: jmp .LBB8_3
539 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
541 ; SSE-NEXT: movss %xmm0, (%esp)
542 ; SSE-NEXT: flds (%esp)
543 ; SSE-NEXT: popl %eax
546 ; NOSSE2-LABEL: test9:
548 ; NOSSE2-NEXT: pushl %eax
549 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
550 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
551 ; NOSSE2-NEXT: ja .LBB8_1
552 ; NOSSE2-NEXT: # %bb.2:
553 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
554 ; NOSSE2-NEXT: jmp .LBB8_3
555 ; NOSSE2-NEXT: .LBB8_1:
556 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
557 ; NOSSE2-NEXT: .LBB8_3:
558 ; NOSSE2-NEXT: movss %xmm0, (%esp)
559 ; NOSSE2-NEXT: flds (%esp)
560 ; NOSSE2-NEXT: popl %eax
563 ; NOSSE1-LABEL: test9:
565 ; NOSSE1-NEXT: flds {{[0-9]+}}(%esp)
566 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
567 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
568 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
569 ; NOSSE1-NEXT: fxch %st(1)
570 ; NOSSE1-NEXT: fcmovnbe %st(1), %st
571 ; NOSSE1-NEXT: fstp %st(1)
574 ; NOCMOV-LABEL: test9:
576 ; NOCMOV-NEXT: flds {{[0-9]+}}(%esp)
577 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
578 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
579 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
580 ; NOCMOV-NEXT: ja .LBB8_2
581 ; NOCMOV-NEXT: # %bb.1:
582 ; NOCMOV-NEXT: fstp %st(0)
584 ; NOCMOV-NEXT: fxch %st(1)
585 ; NOCMOV-NEXT: .LBB8_2:
586 ; NOCMOV-NEXT: fstp %st(1)
588 %cmp = icmp ugt i32 %a, %b
589 %sel = select i1 %cmp, float 99.0, float %x
593 define float @test10(i32 %a, i32 %b, float %x) nounwind {
596 ; SSE-NEXT: pushl %eax
597 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
598 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
599 ; SSE-NEXT: jae .LBB9_1
601 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
602 ; SSE-NEXT: jmp .LBB9_3
604 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
606 ; SSE-NEXT: movss %xmm0, (%esp)
607 ; SSE-NEXT: flds (%esp)
608 ; SSE-NEXT: popl %eax
611 ; NOSSE2-LABEL: test10:
613 ; NOSSE2-NEXT: pushl %eax
614 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
615 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
616 ; NOSSE2-NEXT: jae .LBB9_1
617 ; NOSSE2-NEXT: # %bb.2:
618 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
619 ; NOSSE2-NEXT: jmp .LBB9_3
620 ; NOSSE2-NEXT: .LBB9_1:
621 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
622 ; NOSSE2-NEXT: .LBB9_3:
623 ; NOSSE2-NEXT: movss %xmm0, (%esp)
624 ; NOSSE2-NEXT: flds (%esp)
625 ; NOSSE2-NEXT: popl %eax
628 ; NOSSE1-LABEL: test10:
630 ; NOSSE1-NEXT: flds {{[0-9]+}}(%esp)
631 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
632 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
633 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
634 ; NOSSE1-NEXT: fxch %st(1)
635 ; NOSSE1-NEXT: fcmovnb %st(1), %st
636 ; NOSSE1-NEXT: fstp %st(1)
639 ; NOCMOV-LABEL: test10:
641 ; NOCMOV-NEXT: flds {{[0-9]+}}(%esp)
642 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
643 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
644 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
645 ; NOCMOV-NEXT: jae .LBB9_2
646 ; NOCMOV-NEXT: # %bb.1:
647 ; NOCMOV-NEXT: fstp %st(0)
649 ; NOCMOV-NEXT: fxch %st(1)
650 ; NOCMOV-NEXT: .LBB9_2:
651 ; NOCMOV-NEXT: fstp %st(1)
653 %cmp = icmp uge i32 %a, %b
654 %sel = select i1 %cmp, float 99.0, float %x
658 define float @test11(i32 %a, i32 %b, float %x) nounwind {
661 ; SSE-NEXT: pushl %eax
662 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
663 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
664 ; SSE-NEXT: jb .LBB10_1
666 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
667 ; SSE-NEXT: jmp .LBB10_3
668 ; SSE-NEXT: .LBB10_1:
669 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
670 ; SSE-NEXT: .LBB10_3:
671 ; SSE-NEXT: movss %xmm0, (%esp)
672 ; SSE-NEXT: flds (%esp)
673 ; SSE-NEXT: popl %eax
676 ; NOSSE2-LABEL: test11:
678 ; NOSSE2-NEXT: pushl %eax
679 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
680 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
681 ; NOSSE2-NEXT: jb .LBB10_1
682 ; NOSSE2-NEXT: # %bb.2:
683 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
684 ; NOSSE2-NEXT: jmp .LBB10_3
685 ; NOSSE2-NEXT: .LBB10_1:
686 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
687 ; NOSSE2-NEXT: .LBB10_3:
688 ; NOSSE2-NEXT: movss %xmm0, (%esp)
689 ; NOSSE2-NEXT: flds (%esp)
690 ; NOSSE2-NEXT: popl %eax
693 ; NOSSE1-LABEL: test11:
695 ; NOSSE1-NEXT: flds {{[0-9]+}}(%esp)
696 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
697 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
698 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
699 ; NOSSE1-NEXT: fxch %st(1)
700 ; NOSSE1-NEXT: fcmovb %st(1), %st
701 ; NOSSE1-NEXT: fstp %st(1)
704 ; NOCMOV-LABEL: test11:
706 ; NOCMOV-NEXT: flds {{[0-9]+}}(%esp)
707 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
708 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
709 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
710 ; NOCMOV-NEXT: jb .LBB10_2
711 ; NOCMOV-NEXT: # %bb.1:
712 ; NOCMOV-NEXT: fstp %st(0)
714 ; NOCMOV-NEXT: fxch %st(1)
715 ; NOCMOV-NEXT: .LBB10_2:
716 ; NOCMOV-NEXT: fstp %st(1)
718 %cmp = icmp ult i32 %a, %b
719 %sel = select i1 %cmp, float 99.0, float %x
723 define float @test12(i32 %a, i32 %b, float %x) nounwind {
726 ; SSE-NEXT: pushl %eax
727 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
728 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
729 ; SSE-NEXT: jbe .LBB11_1
731 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
732 ; SSE-NEXT: jmp .LBB11_3
733 ; SSE-NEXT: .LBB11_1:
734 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
735 ; SSE-NEXT: .LBB11_3:
736 ; SSE-NEXT: movss %xmm0, (%esp)
737 ; SSE-NEXT: flds (%esp)
738 ; SSE-NEXT: popl %eax
741 ; NOSSE2-LABEL: test12:
743 ; NOSSE2-NEXT: pushl %eax
744 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
745 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
746 ; NOSSE2-NEXT: jbe .LBB11_1
747 ; NOSSE2-NEXT: # %bb.2:
748 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
749 ; NOSSE2-NEXT: jmp .LBB11_3
750 ; NOSSE2-NEXT: .LBB11_1:
751 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
752 ; NOSSE2-NEXT: .LBB11_3:
753 ; NOSSE2-NEXT: movss %xmm0, (%esp)
754 ; NOSSE2-NEXT: flds (%esp)
755 ; NOSSE2-NEXT: popl %eax
758 ; NOSSE1-LABEL: test12:
760 ; NOSSE1-NEXT: flds {{[0-9]+}}(%esp)
761 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
762 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
763 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
764 ; NOSSE1-NEXT: fxch %st(1)
765 ; NOSSE1-NEXT: fcmovbe %st(1), %st
766 ; NOSSE1-NEXT: fstp %st(1)
769 ; NOCMOV-LABEL: test12:
771 ; NOCMOV-NEXT: flds {{[0-9]+}}(%esp)
772 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
773 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
774 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
775 ; NOCMOV-NEXT: jbe .LBB11_2
776 ; NOCMOV-NEXT: # %bb.1:
777 ; NOCMOV-NEXT: fstp %st(0)
779 ; NOCMOV-NEXT: fxch %st(1)
780 ; NOCMOV-NEXT: .LBB11_2:
781 ; NOCMOV-NEXT: fstp %st(1)
783 %cmp = icmp ule i32 %a, %b
784 %sel = select i1 %cmp, float 99.0, float %x
788 define float @test13(i32 %a, i32 %b, float %x) nounwind {
791 ; SSE-NEXT: pushl %eax
792 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
793 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
794 ; SSE-NEXT: jg .LBB12_1
796 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
797 ; SSE-NEXT: jmp .LBB12_3
798 ; SSE-NEXT: .LBB12_1:
799 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
800 ; SSE-NEXT: .LBB12_3:
801 ; SSE-NEXT: movss %xmm0, (%esp)
802 ; SSE-NEXT: flds (%esp)
803 ; SSE-NEXT: popl %eax
806 ; NOSSE2-LABEL: test13:
808 ; NOSSE2-NEXT: pushl %eax
809 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
810 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
811 ; NOSSE2-NEXT: jg .LBB12_1
812 ; NOSSE2-NEXT: # %bb.2:
813 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
814 ; NOSSE2-NEXT: jmp .LBB12_3
815 ; NOSSE2-NEXT: .LBB12_1:
816 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
817 ; NOSSE2-NEXT: .LBB12_3:
818 ; NOSSE2-NEXT: movss %xmm0, (%esp)
819 ; NOSSE2-NEXT: flds (%esp)
820 ; NOSSE2-NEXT: popl %eax
823 ; NOSSE1-LABEL: test13:
825 ; NOSSE1-NEXT: flds {{[0-9]+}}(%esp)
826 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
827 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
828 ; NOSSE1-NEXT: setg %al
829 ; NOSSE1-NEXT: testb %al, %al
830 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
831 ; NOSSE1-NEXT: fxch %st(1)
832 ; NOSSE1-NEXT: fcmovne %st(1), %st
833 ; NOSSE1-NEXT: fstp %st(1)
836 ; NOCMOV-LABEL: test13:
838 ; NOCMOV-NEXT: flds {{[0-9]+}}(%esp)
839 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
840 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
841 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
842 ; NOCMOV-NEXT: jg .LBB12_2
843 ; NOCMOV-NEXT: # %bb.1:
844 ; NOCMOV-NEXT: fstp %st(0)
846 ; NOCMOV-NEXT: fxch %st(1)
847 ; NOCMOV-NEXT: .LBB12_2:
848 ; NOCMOV-NEXT: fstp %st(1)
850 %cmp = icmp sgt i32 %a, %b
851 %sel = select i1 %cmp, float 99.0, float %x
855 define float @test14(i32 %a, i32 %b, float %x) nounwind {
858 ; SSE-NEXT: pushl %eax
859 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
860 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
861 ; SSE-NEXT: jge .LBB13_1
863 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
864 ; SSE-NEXT: jmp .LBB13_3
865 ; SSE-NEXT: .LBB13_1:
866 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
867 ; SSE-NEXT: .LBB13_3:
868 ; SSE-NEXT: movss %xmm0, (%esp)
869 ; SSE-NEXT: flds (%esp)
870 ; SSE-NEXT: popl %eax
873 ; NOSSE2-LABEL: test14:
875 ; NOSSE2-NEXT: pushl %eax
876 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
877 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
878 ; NOSSE2-NEXT: jge .LBB13_1
879 ; NOSSE2-NEXT: # %bb.2:
880 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
881 ; NOSSE2-NEXT: jmp .LBB13_3
882 ; NOSSE2-NEXT: .LBB13_1:
883 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
884 ; NOSSE2-NEXT: .LBB13_3:
885 ; NOSSE2-NEXT: movss %xmm0, (%esp)
886 ; NOSSE2-NEXT: flds (%esp)
887 ; NOSSE2-NEXT: popl %eax
890 ; NOSSE1-LABEL: test14:
892 ; NOSSE1-NEXT: flds {{[0-9]+}}(%esp)
893 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
894 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
895 ; NOSSE1-NEXT: setge %al
896 ; NOSSE1-NEXT: testb %al, %al
897 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
898 ; NOSSE1-NEXT: fxch %st(1)
899 ; NOSSE1-NEXT: fcmovne %st(1), %st
900 ; NOSSE1-NEXT: fstp %st(1)
903 ; NOCMOV-LABEL: test14:
905 ; NOCMOV-NEXT: flds {{[0-9]+}}(%esp)
906 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
907 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
908 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
909 ; NOCMOV-NEXT: jge .LBB13_2
910 ; NOCMOV-NEXT: # %bb.1:
911 ; NOCMOV-NEXT: fstp %st(0)
913 ; NOCMOV-NEXT: fxch %st(1)
914 ; NOCMOV-NEXT: .LBB13_2:
915 ; NOCMOV-NEXT: fstp %st(1)
917 %cmp = icmp sge i32 %a, %b
918 %sel = select i1 %cmp, float 99.0, float %x
922 define float @test15(i32 %a, i32 %b, float %x) nounwind {
925 ; SSE-NEXT: pushl %eax
926 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
927 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
928 ; SSE-NEXT: jl .LBB14_1
930 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
931 ; SSE-NEXT: jmp .LBB14_3
932 ; SSE-NEXT: .LBB14_1:
933 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
934 ; SSE-NEXT: .LBB14_3:
935 ; SSE-NEXT: movss %xmm0, (%esp)
936 ; SSE-NEXT: flds (%esp)
937 ; SSE-NEXT: popl %eax
940 ; NOSSE2-LABEL: test15:
942 ; NOSSE2-NEXT: pushl %eax
943 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
944 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
945 ; NOSSE2-NEXT: jl .LBB14_1
946 ; NOSSE2-NEXT: # %bb.2:
947 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
948 ; NOSSE2-NEXT: jmp .LBB14_3
949 ; NOSSE2-NEXT: .LBB14_1:
950 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
951 ; NOSSE2-NEXT: .LBB14_3:
952 ; NOSSE2-NEXT: movss %xmm0, (%esp)
953 ; NOSSE2-NEXT: flds (%esp)
954 ; NOSSE2-NEXT: popl %eax
957 ; NOSSE1-LABEL: test15:
959 ; NOSSE1-NEXT: flds {{[0-9]+}}(%esp)
960 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
961 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
962 ; NOSSE1-NEXT: setl %al
963 ; NOSSE1-NEXT: testb %al, %al
964 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
965 ; NOSSE1-NEXT: fxch %st(1)
966 ; NOSSE1-NEXT: fcmovne %st(1), %st
967 ; NOSSE1-NEXT: fstp %st(1)
970 ; NOCMOV-LABEL: test15:
972 ; NOCMOV-NEXT: flds {{[0-9]+}}(%esp)
973 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
974 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
975 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
976 ; NOCMOV-NEXT: jl .LBB14_2
977 ; NOCMOV-NEXT: # %bb.1:
978 ; NOCMOV-NEXT: fstp %st(0)
980 ; NOCMOV-NEXT: fxch %st(1)
981 ; NOCMOV-NEXT: .LBB14_2:
982 ; NOCMOV-NEXT: fstp %st(1)
984 %cmp = icmp slt i32 %a, %b
985 %sel = select i1 %cmp, float 99.0, float %x
989 define float @test16(i32 %a, i32 %b, float %x) nounwind {
992 ; SSE-NEXT: pushl %eax
993 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
994 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
995 ; SSE-NEXT: jle .LBB15_1
997 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
998 ; SSE-NEXT: jmp .LBB15_3
999 ; SSE-NEXT: .LBB15_1:
1000 ; SSE-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1001 ; SSE-NEXT: .LBB15_3:
1002 ; SSE-NEXT: movss %xmm0, (%esp)
1003 ; SSE-NEXT: flds (%esp)
1004 ; SSE-NEXT: popl %eax
1007 ; NOSSE2-LABEL: test16:
1009 ; NOSSE2-NEXT: pushl %eax
1010 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
1011 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1012 ; NOSSE2-NEXT: jle .LBB15_1
1013 ; NOSSE2-NEXT: # %bb.2:
1014 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1015 ; NOSSE2-NEXT: jmp .LBB15_3
1016 ; NOSSE2-NEXT: .LBB15_1:
1017 ; NOSSE2-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
1018 ; NOSSE2-NEXT: .LBB15_3:
1019 ; NOSSE2-NEXT: movss %xmm0, (%esp)
1020 ; NOSSE2-NEXT: flds (%esp)
1021 ; NOSSE2-NEXT: popl %eax
1024 ; NOSSE1-LABEL: test16:
1026 ; NOSSE1-NEXT: flds {{[0-9]+}}(%esp)
1027 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
1028 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1029 ; NOSSE1-NEXT: setle %al
1030 ; NOSSE1-NEXT: testb %al, %al
1031 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1032 ; NOSSE1-NEXT: fxch %st(1)
1033 ; NOSSE1-NEXT: fcmovne %st(1), %st
1034 ; NOSSE1-NEXT: fstp %st(1)
1037 ; NOCMOV-LABEL: test16:
1039 ; NOCMOV-NEXT: flds {{[0-9]+}}(%esp)
1040 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
1041 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1042 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1043 ; NOCMOV-NEXT: jle .LBB15_2
1044 ; NOCMOV-NEXT: # %bb.1:
1045 ; NOCMOV-NEXT: fstp %st(0)
1047 ; NOCMOV-NEXT: fxch %st(1)
1048 ; NOCMOV-NEXT: .LBB15_2:
1049 ; NOCMOV-NEXT: fstp %st(1)
1051 %cmp = icmp sle i32 %a, %b
1052 %sel = select i1 %cmp, float 99.0, float %x
1056 define x86_fp80 @test17(i32 %a, i32 %b, x86_fp80 %x) nounwind {
1057 ; SSE-LABEL: test17:
1059 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
1060 ; SSE-NEXT: fldt {{[0-9]+}}(%esp)
1061 ; SSE-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1062 ; SSE-NEXT: fxch %st(1)
1063 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1064 ; SSE-NEXT: fcmovnbe %st(1), %st
1065 ; SSE-NEXT: fstp %st(1)
1068 ; NOSSE2-LABEL: test17:
1070 ; NOSSE2-NEXT: fldt {{[0-9]+}}(%esp)
1071 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
1072 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1073 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1074 ; NOSSE2-NEXT: fxch %st(1)
1075 ; NOSSE2-NEXT: fcmovnbe %st(1), %st
1076 ; NOSSE2-NEXT: fstp %st(1)
1079 ; NOSSE1-LABEL: test17:
1081 ; NOSSE1-NEXT: fldt {{[0-9]+}}(%esp)
1082 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
1083 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1084 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1085 ; NOSSE1-NEXT: fxch %st(1)
1086 ; NOSSE1-NEXT: fcmovnbe %st(1), %st
1087 ; NOSSE1-NEXT: fstp %st(1)
1090 ; NOCMOV-LABEL: test17:
1092 ; NOCMOV-NEXT: fldt {{[0-9]+}}(%esp)
1093 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
1094 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1095 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1096 ; NOCMOV-NEXT: ja .LBB16_2
1097 ; NOCMOV-NEXT: # %bb.1:
1098 ; NOCMOV-NEXT: fstp %st(0)
1100 ; NOCMOV-NEXT: fxch %st(1)
1101 ; NOCMOV-NEXT: .LBB16_2:
1102 ; NOCMOV-NEXT: fstp %st(1)
1104 %cmp = icmp ugt i32 %a, %b
1105 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
1109 define x86_fp80 @test18(i32 %a, i32 %b, x86_fp80 %x) nounwind {
1110 ; SSE-LABEL: test18:
1112 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
1113 ; SSE-NEXT: fldt {{[0-9]+}}(%esp)
1114 ; SSE-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1115 ; SSE-NEXT: fxch %st(1)
1116 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1117 ; SSE-NEXT: fcmovnb %st(1), %st
1118 ; SSE-NEXT: fstp %st(1)
1121 ; NOSSE2-LABEL: test18:
1123 ; NOSSE2-NEXT: fldt {{[0-9]+}}(%esp)
1124 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
1125 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1126 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1127 ; NOSSE2-NEXT: fxch %st(1)
1128 ; NOSSE2-NEXT: fcmovnb %st(1), %st
1129 ; NOSSE2-NEXT: fstp %st(1)
1132 ; NOSSE1-LABEL: test18:
1134 ; NOSSE1-NEXT: fldt {{[0-9]+}}(%esp)
1135 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
1136 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1137 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1138 ; NOSSE1-NEXT: fxch %st(1)
1139 ; NOSSE1-NEXT: fcmovnb %st(1), %st
1140 ; NOSSE1-NEXT: fstp %st(1)
1143 ; NOCMOV-LABEL: test18:
1145 ; NOCMOV-NEXT: fldt {{[0-9]+}}(%esp)
1146 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
1147 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1148 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1149 ; NOCMOV-NEXT: jae .LBB17_2
1150 ; NOCMOV-NEXT: # %bb.1:
1151 ; NOCMOV-NEXT: fstp %st(0)
1153 ; NOCMOV-NEXT: fxch %st(1)
1154 ; NOCMOV-NEXT: .LBB17_2:
1155 ; NOCMOV-NEXT: fstp %st(1)
1157 %cmp = icmp uge i32 %a, %b
1158 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
1162 define x86_fp80 @test19(i32 %a, i32 %b, x86_fp80 %x) nounwind {
1163 ; SSE-LABEL: test19:
1165 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
1166 ; SSE-NEXT: fldt {{[0-9]+}}(%esp)
1167 ; SSE-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1168 ; SSE-NEXT: fxch %st(1)
1169 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1170 ; SSE-NEXT: fcmovb %st(1), %st
1171 ; SSE-NEXT: fstp %st(1)
1174 ; NOSSE2-LABEL: test19:
1176 ; NOSSE2-NEXT: fldt {{[0-9]+}}(%esp)
1177 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
1178 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1179 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1180 ; NOSSE2-NEXT: fxch %st(1)
1181 ; NOSSE2-NEXT: fcmovb %st(1), %st
1182 ; NOSSE2-NEXT: fstp %st(1)
1185 ; NOSSE1-LABEL: test19:
1187 ; NOSSE1-NEXT: fldt {{[0-9]+}}(%esp)
1188 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
1189 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1190 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1191 ; NOSSE1-NEXT: fxch %st(1)
1192 ; NOSSE1-NEXT: fcmovb %st(1), %st
1193 ; NOSSE1-NEXT: fstp %st(1)
1196 ; NOCMOV-LABEL: test19:
1198 ; NOCMOV-NEXT: fldt {{[0-9]+}}(%esp)
1199 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
1200 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1201 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1202 ; NOCMOV-NEXT: jb .LBB18_2
1203 ; NOCMOV-NEXT: # %bb.1:
1204 ; NOCMOV-NEXT: fstp %st(0)
1206 ; NOCMOV-NEXT: fxch %st(1)
1207 ; NOCMOV-NEXT: .LBB18_2:
1208 ; NOCMOV-NEXT: fstp %st(1)
1210 %cmp = icmp ult i32 %a, %b
1211 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
1215 define x86_fp80 @test20(i32 %a, i32 %b, x86_fp80 %x) nounwind {
1216 ; SSE-LABEL: test20:
1218 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
1219 ; SSE-NEXT: fldt {{[0-9]+}}(%esp)
1220 ; SSE-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1221 ; SSE-NEXT: fxch %st(1)
1222 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1223 ; SSE-NEXT: fcmovbe %st(1), %st
1224 ; SSE-NEXT: fstp %st(1)
1227 ; NOSSE2-LABEL: test20:
1229 ; NOSSE2-NEXT: fldt {{[0-9]+}}(%esp)
1230 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
1231 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1232 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1233 ; NOSSE2-NEXT: fxch %st(1)
1234 ; NOSSE2-NEXT: fcmovbe %st(1), %st
1235 ; NOSSE2-NEXT: fstp %st(1)
1238 ; NOSSE1-LABEL: test20:
1240 ; NOSSE1-NEXT: fldt {{[0-9]+}}(%esp)
1241 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
1242 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1243 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1244 ; NOSSE1-NEXT: fxch %st(1)
1245 ; NOSSE1-NEXT: fcmovbe %st(1), %st
1246 ; NOSSE1-NEXT: fstp %st(1)
1249 ; NOCMOV-LABEL: test20:
1251 ; NOCMOV-NEXT: fldt {{[0-9]+}}(%esp)
1252 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
1253 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1254 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1255 ; NOCMOV-NEXT: jbe .LBB19_2
1256 ; NOCMOV-NEXT: # %bb.1:
1257 ; NOCMOV-NEXT: fstp %st(0)
1259 ; NOCMOV-NEXT: fxch %st(1)
1260 ; NOCMOV-NEXT: .LBB19_2:
1261 ; NOCMOV-NEXT: fstp %st(1)
1263 %cmp = icmp ule i32 %a, %b
1264 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
1268 define x86_fp80 @test21(i32 %a, i32 %b, x86_fp80 %x) nounwind {
1269 ; SSE-LABEL: test21:
1271 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
1272 ; SSE-NEXT: fldt {{[0-9]+}}(%esp)
1273 ; SSE-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1274 ; SSE-NEXT: fxch %st(1)
1275 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1276 ; SSE-NEXT: setg %al
1277 ; SSE-NEXT: testb %al, %al
1278 ; SSE-NEXT: fcmovne %st(1), %st
1279 ; SSE-NEXT: fstp %st(1)
1282 ; NOSSE2-LABEL: test21:
1284 ; NOSSE2-NEXT: fldt {{[0-9]+}}(%esp)
1285 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
1286 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1287 ; NOSSE2-NEXT: setg %al
1288 ; NOSSE2-NEXT: testb %al, %al
1289 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1290 ; NOSSE2-NEXT: fxch %st(1)
1291 ; NOSSE2-NEXT: fcmovne %st(1), %st
1292 ; NOSSE2-NEXT: fstp %st(1)
1295 ; NOSSE1-LABEL: test21:
1297 ; NOSSE1-NEXT: fldt {{[0-9]+}}(%esp)
1298 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
1299 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1300 ; NOSSE1-NEXT: setg %al
1301 ; NOSSE1-NEXT: testb %al, %al
1302 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1303 ; NOSSE1-NEXT: fxch %st(1)
1304 ; NOSSE1-NEXT: fcmovne %st(1), %st
1305 ; NOSSE1-NEXT: fstp %st(1)
1308 ; NOCMOV-LABEL: test21:
1310 ; NOCMOV-NEXT: fldt {{[0-9]+}}(%esp)
1311 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
1312 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1313 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1314 ; NOCMOV-NEXT: jg .LBB20_2
1315 ; NOCMOV-NEXT: # %bb.1:
1316 ; NOCMOV-NEXT: fstp %st(0)
1318 ; NOCMOV-NEXT: fxch %st(1)
1319 ; NOCMOV-NEXT: .LBB20_2:
1320 ; NOCMOV-NEXT: fstp %st(1)
1322 ; We don't emit a branch for fp80, why?
1323 %cmp = icmp sgt i32 %a, %b
1324 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
1328 define x86_fp80 @test22(i32 %a, i32 %b, x86_fp80 %x) nounwind {
1329 ; SSE-LABEL: test22:
1331 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
1332 ; SSE-NEXT: fldt {{[0-9]+}}(%esp)
1333 ; SSE-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1334 ; SSE-NEXT: fxch %st(1)
1335 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1336 ; SSE-NEXT: setge %al
1337 ; SSE-NEXT: testb %al, %al
1338 ; SSE-NEXT: fcmovne %st(1), %st
1339 ; SSE-NEXT: fstp %st(1)
1342 ; NOSSE2-LABEL: test22:
1344 ; NOSSE2-NEXT: fldt {{[0-9]+}}(%esp)
1345 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
1346 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1347 ; NOSSE2-NEXT: setge %al
1348 ; NOSSE2-NEXT: testb %al, %al
1349 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1350 ; NOSSE2-NEXT: fxch %st(1)
1351 ; NOSSE2-NEXT: fcmovne %st(1), %st
1352 ; NOSSE2-NEXT: fstp %st(1)
1355 ; NOSSE1-LABEL: test22:
1357 ; NOSSE1-NEXT: fldt {{[0-9]+}}(%esp)
1358 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
1359 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1360 ; NOSSE1-NEXT: setge %al
1361 ; NOSSE1-NEXT: testb %al, %al
1362 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1363 ; NOSSE1-NEXT: fxch %st(1)
1364 ; NOSSE1-NEXT: fcmovne %st(1), %st
1365 ; NOSSE1-NEXT: fstp %st(1)
1368 ; NOCMOV-LABEL: test22:
1370 ; NOCMOV-NEXT: fldt {{[0-9]+}}(%esp)
1371 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
1372 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1373 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1374 ; NOCMOV-NEXT: jge .LBB21_2
1375 ; NOCMOV-NEXT: # %bb.1:
1376 ; NOCMOV-NEXT: fstp %st(0)
1378 ; NOCMOV-NEXT: fxch %st(1)
1379 ; NOCMOV-NEXT: .LBB21_2:
1380 ; NOCMOV-NEXT: fstp %st(1)
1382 %cmp = icmp sge i32 %a, %b
1383 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
1387 define x86_fp80 @test23(i32 %a, i32 %b, x86_fp80 %x) nounwind {
1388 ; SSE-LABEL: test23:
1390 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
1391 ; SSE-NEXT: fldt {{[0-9]+}}(%esp)
1392 ; SSE-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1393 ; SSE-NEXT: fxch %st(1)
1394 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1395 ; SSE-NEXT: setl %al
1396 ; SSE-NEXT: testb %al, %al
1397 ; SSE-NEXT: fcmovne %st(1), %st
1398 ; SSE-NEXT: fstp %st(1)
1401 ; NOSSE2-LABEL: test23:
1403 ; NOSSE2-NEXT: fldt {{[0-9]+}}(%esp)
1404 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
1405 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1406 ; NOSSE2-NEXT: setl %al
1407 ; NOSSE2-NEXT: testb %al, %al
1408 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1409 ; NOSSE2-NEXT: fxch %st(1)
1410 ; NOSSE2-NEXT: fcmovne %st(1), %st
1411 ; NOSSE2-NEXT: fstp %st(1)
1414 ; NOSSE1-LABEL: test23:
1416 ; NOSSE1-NEXT: fldt {{[0-9]+}}(%esp)
1417 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
1418 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1419 ; NOSSE1-NEXT: setl %al
1420 ; NOSSE1-NEXT: testb %al, %al
1421 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1422 ; NOSSE1-NEXT: fxch %st(1)
1423 ; NOSSE1-NEXT: fcmovne %st(1), %st
1424 ; NOSSE1-NEXT: fstp %st(1)
1427 ; NOCMOV-LABEL: test23:
1429 ; NOCMOV-NEXT: fldt {{[0-9]+}}(%esp)
1430 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
1431 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1432 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1433 ; NOCMOV-NEXT: jl .LBB22_2
1434 ; NOCMOV-NEXT: # %bb.1:
1435 ; NOCMOV-NEXT: fstp %st(0)
1437 ; NOCMOV-NEXT: fxch %st(1)
1438 ; NOCMOV-NEXT: .LBB22_2:
1439 ; NOCMOV-NEXT: fstp %st(1)
1441 %cmp = icmp slt i32 %a, %b
1442 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
1446 define x86_fp80 @test24(i32 %a, i32 %b, x86_fp80 %x) nounwind {
1447 ; SSE-LABEL: test24:
1449 ; SSE-NEXT: movl {{[0-9]+}}(%esp), %eax
1450 ; SSE-NEXT: fldt {{[0-9]+}}(%esp)
1451 ; SSE-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1452 ; SSE-NEXT: fxch %st(1)
1453 ; SSE-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1454 ; SSE-NEXT: setle %al
1455 ; SSE-NEXT: testb %al, %al
1456 ; SSE-NEXT: fcmovne %st(1), %st
1457 ; SSE-NEXT: fstp %st(1)
1460 ; NOSSE2-LABEL: test24:
1462 ; NOSSE2-NEXT: fldt {{[0-9]+}}(%esp)
1463 ; NOSSE2-NEXT: movl {{[0-9]+}}(%esp), %eax
1464 ; NOSSE2-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1465 ; NOSSE2-NEXT: setle %al
1466 ; NOSSE2-NEXT: testb %al, %al
1467 ; NOSSE2-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1468 ; NOSSE2-NEXT: fxch %st(1)
1469 ; NOSSE2-NEXT: fcmovne %st(1), %st
1470 ; NOSSE2-NEXT: fstp %st(1)
1473 ; NOSSE1-LABEL: test24:
1475 ; NOSSE1-NEXT: fldt {{[0-9]+}}(%esp)
1476 ; NOSSE1-NEXT: movl {{[0-9]+}}(%esp), %eax
1477 ; NOSSE1-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1478 ; NOSSE1-NEXT: setle %al
1479 ; NOSSE1-NEXT: testb %al, %al
1480 ; NOSSE1-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1481 ; NOSSE1-NEXT: fxch %st(1)
1482 ; NOSSE1-NEXT: fcmovne %st(1), %st
1483 ; NOSSE1-NEXT: fstp %st(1)
1486 ; NOCMOV-LABEL: test24:
1488 ; NOCMOV-NEXT: fldt {{[0-9]+}}(%esp)
1489 ; NOCMOV-NEXT: movl {{[0-9]+}}(%esp), %eax
1490 ; NOCMOV-NEXT: cmpl {{[0-9]+}}(%esp), %eax
1491 ; NOCMOV-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}
1492 ; NOCMOV-NEXT: jle .LBB23_2
1493 ; NOCMOV-NEXT: # %bb.1:
1494 ; NOCMOV-NEXT: fstp %st(0)
1496 ; NOCMOV-NEXT: fxch %st(1)
1497 ; NOCMOV-NEXT: .LBB23_2:
1498 ; NOCMOV-NEXT: fstp %st(1)
1500 %cmp = icmp sle i32 %a, %b
1501 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x