1 ; RUN: llc -march x86 -mcpu pentium4 < %s | FileCheck %s -check-prefix=SSE
2 ; RUN: llc -march x86 -mcpu pentium3 < %s | FileCheck %s -check-prefix=NOSSE2
3 ; RUN: llc -march x86 -mcpu pentium2 < %s | FileCheck %s -check-prefix=NOSSE1
4 ; RUN: llc -march x86 -mcpu pentium < %s | FileCheck %s -check-prefix=NOCMOV
7 define double @test1(i32 %a, i32 %b, double %x) nounwind {
8 %cmp = icmp ugt i32 %a, %b
9 %sel = select i1 %cmp, double 99.0, double %x
26 define double @test2(i32 %a, i32 %b, double %x) nounwind {
27 %cmp = icmp uge i32 %a, %b
28 %sel = select i1 %cmp, double 99.0, double %x
44 define double @test3(i32 %a, i32 %b, double %x) nounwind {
45 %cmp = icmp ult i32 %a, %b
46 %sel = select i1 %cmp, double 99.0, double %x
62 define double @test4(i32 %a, i32 %b, double %x) nounwind {
63 %cmp = icmp ule i32 %a, %b
64 %sel = select i1 %cmp, double 99.0, double %x
80 define double @test5(i32 %a, i32 %b, double %x) nounwind {
81 %cmp = icmp sgt i32 %a, %b
82 %sel = select i1 %cmp, double 99.0, double %x
98 define double @test6(i32 %a, i32 %b, double %x) nounwind {
99 %cmp = icmp sge i32 %a, %b
100 %sel = select i1 %cmp, double 99.0, double %x
116 define double @test7(i32 %a, i32 %b, double %x) nounwind {
117 %cmp = icmp slt i32 %a, %b
118 %sel = select i1 %cmp, double 99.0, double %x
134 define double @test8(i32 %a, i32 %b, double %x) nounwind {
135 %cmp = icmp sle i32 %a, %b
136 %sel = select i1 %cmp, double 99.0, double %x
152 define float @test9(i32 %a, i32 %b, float %x) nounwind {
153 %cmp = icmp ugt i32 %a, %b
154 %sel = select i1 %cmp, float 99.0, float %x
170 define float @test10(i32 %a, i32 %b, float %x) nounwind {
171 %cmp = icmp uge i32 %a, %b
172 %sel = select i1 %cmp, float 99.0, float %x
188 define float @test11(i32 %a, i32 %b, float %x) nounwind {
189 %cmp = icmp ult i32 %a, %b
190 %sel = select i1 %cmp, float 99.0, float %x
206 define float @test12(i32 %a, i32 %b, float %x) nounwind {
207 %cmp = icmp ule i32 %a, %b
208 %sel = select i1 %cmp, float 99.0, float %x
224 define float @test13(i32 %a, i32 %b, float %x) nounwind {
225 %cmp = icmp sgt i32 %a, %b
226 %sel = select i1 %cmp, float 99.0, float %x
242 define float @test14(i32 %a, i32 %b, float %x) nounwind {
243 %cmp = icmp sge i32 %a, %b
244 %sel = select i1 %cmp, float 99.0, float %x
260 define float @test15(i32 %a, i32 %b, float %x) nounwind {
261 %cmp = icmp slt i32 %a, %b
262 %sel = select i1 %cmp, float 99.0, float %x
278 define float @test16(i32 %a, i32 %b, float %x) nounwind {
279 %cmp = icmp sle i32 %a, %b
280 %sel = select i1 %cmp, float 99.0, float %x
296 define x86_fp80 @test17(i32 %a, i32 %b, x86_fp80 %x) nounwind {
297 %cmp = icmp ugt i32 %a, %b
298 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
314 define x86_fp80 @test18(i32 %a, i32 %b, x86_fp80 %x) nounwind {
315 %cmp = icmp uge i32 %a, %b
316 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
332 define x86_fp80 @test19(i32 %a, i32 %b, x86_fp80 %x) nounwind {
333 %cmp = icmp ult i32 %a, %b
334 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
350 define x86_fp80 @test20(i32 %a, i32 %b, x86_fp80 %x) nounwind {
351 %cmp = icmp ule i32 %a, %b
352 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
368 define x86_fp80 @test21(i32 %a, i32 %b, x86_fp80 %x) nounwind {
369 %cmp = icmp sgt i32 %a, %b
370 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
373 ; We don't emit a branch for fp80, why?
390 define x86_fp80 @test22(i32 %a, i32 %b, x86_fp80 %x) nounwind {
391 %cmp = icmp sge i32 %a, %b
392 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
411 define x86_fp80 @test23(i32 %a, i32 %b, x86_fp80 %x) nounwind {
412 %cmp = icmp slt i32 %a, %b
413 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
432 define x86_fp80 @test24(i32 %a, i32 %b, x86_fp80 %x) nounwind {
433 %cmp = icmp sle i32 %a, %b
434 %sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x