2012-10-07 15:34:27 +00:00
|
|
|
; RUN: llc -march x86 -mcpu pentium4 < %s | FileCheck %s -check-prefix=SSE
|
|
|
|
; RUN: llc -march x86 -mcpu pentium3 < %s | FileCheck %s -check-prefix=NOSSE2
|
|
|
|
; RUN: llc -march x86 -mcpu pentium2 < %s | FileCheck %s -check-prefix=NOSSE1
|
|
|
|
; RUN: llc -march x86 -mcpu pentium < %s | FileCheck %s -check-prefix=NOCMOV
|
|
|
|
; PR14035
|
|
|
|
|
|
|
|
define double @test1(i32 %a, i32 %b, double %x) nounwind {
|
|
|
|
%cmp = icmp ugt i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, double 99.0, double %x
|
|
|
|
ret double %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test1:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movsd
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test1:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: fcmovnbe
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test1:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fcmovnbe
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test1:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
define double @test2(i32 %a, i32 %b, double %x) nounwind {
|
|
|
|
%cmp = icmp uge i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, double 99.0, double %x
|
|
|
|
ret double %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test2:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movsd
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test2:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: fcmovnb
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test2:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fcmovnb
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test2:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define double @test3(i32 %a, i32 %b, double %x) nounwind {
|
|
|
|
%cmp = icmp ult i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, double 99.0, double %x
|
|
|
|
ret double %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test3:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movsd
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test3:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: fcmovb
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test3:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fcmovb
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test3:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define double @test4(i32 %a, i32 %b, double %x) nounwind {
|
|
|
|
%cmp = icmp ule i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, double 99.0, double %x
|
|
|
|
ret double %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test4:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movsd
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test4:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: fcmovbe
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test4:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fcmovbe
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test4:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define double @test5(i32 %a, i32 %b, double %x) nounwind {
|
|
|
|
%cmp = icmp sgt i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, double 99.0, double %x
|
|
|
|
ret double %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test5:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movsd
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test5:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: fstp
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test5:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fstp
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test5:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define double @test6(i32 %a, i32 %b, double %x) nounwind {
|
|
|
|
%cmp = icmp sge i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, double 99.0, double %x
|
|
|
|
ret double %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test6:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movsd
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test6:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: fstp
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test6:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fstp
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test6:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define double @test7(i32 %a, i32 %b, double %x) nounwind {
|
|
|
|
%cmp = icmp slt i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, double 99.0, double %x
|
|
|
|
ret double %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test7:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movsd
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test7:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: fstp
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test7:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fstp
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test7:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define double @test8(i32 %a, i32 %b, double %x) nounwind {
|
|
|
|
%cmp = icmp sle i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, double 99.0, double %x
|
|
|
|
ret double %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test8:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movsd
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test8:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: fstp
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test8:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fstp
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test8:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define float @test9(i32 %a, i32 %b, float %x) nounwind {
|
|
|
|
%cmp = icmp ugt i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, float 99.0, float %x
|
|
|
|
ret float %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test9:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test9:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test9:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fcmovnbe
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test9:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define float @test10(i32 %a, i32 %b, float %x) nounwind {
|
|
|
|
%cmp = icmp uge i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, float 99.0, float %x
|
|
|
|
ret float %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test10:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test10:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test10:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fcmovnb
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test10:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define float @test11(i32 %a, i32 %b, float %x) nounwind {
|
|
|
|
%cmp = icmp ult i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, float 99.0, float %x
|
|
|
|
ret float %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test11:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test11:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test11:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fcmovb
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test11:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define float @test12(i32 %a, i32 %b, float %x) nounwind {
|
|
|
|
%cmp = icmp ule i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, float 99.0, float %x
|
|
|
|
ret float %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test12:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test12:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test12:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fcmovbe
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test12:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define float @test13(i32 %a, i32 %b, float %x) nounwind {
|
|
|
|
%cmp = icmp sgt i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, float 99.0, float %x
|
|
|
|
ret float %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test13:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test13:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test13:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fstp
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test13:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define float @test14(i32 %a, i32 %b, float %x) nounwind {
|
|
|
|
%cmp = icmp sge i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, float 99.0, float %x
|
|
|
|
ret float %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test14:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test14:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test14:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fstp
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test14:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define float @test15(i32 %a, i32 %b, float %x) nounwind {
|
|
|
|
%cmp = icmp slt i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, float 99.0, float %x
|
|
|
|
ret float %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test15:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test15:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test15:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fstp
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test15:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define float @test16(i32 %a, i32 %b, float %x) nounwind {
|
|
|
|
%cmp = icmp sle i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, float 99.0, float %x
|
|
|
|
ret float %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test16:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test16:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: movss
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test16:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fstp
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test16:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define x86_fp80 @test17(i32 %a, i32 %b, x86_fp80 %x) nounwind {
|
|
|
|
%cmp = icmp ugt i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
|
|
|
|
ret x86_fp80 %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test17:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: fcmovnbe
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test17:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: fcmovnbe
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test17:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fcmovnbe
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test17:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define x86_fp80 @test18(i32 %a, i32 %b, x86_fp80 %x) nounwind {
|
|
|
|
%cmp = icmp uge i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
|
|
|
|
ret x86_fp80 %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test18:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: fcmovnb
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test18:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: fcmovnb
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test18:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fcmovnb
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test18:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define x86_fp80 @test19(i32 %a, i32 %b, x86_fp80 %x) nounwind {
|
|
|
|
%cmp = icmp ult i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
|
|
|
|
ret x86_fp80 %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test19:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: fcmovb
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test19:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: fcmovb
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test19:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fcmovb
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test19:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define x86_fp80 @test20(i32 %a, i32 %b, x86_fp80 %x) nounwind {
|
|
|
|
%cmp = icmp ule i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
|
|
|
|
ret x86_fp80 %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test20:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: fcmovbe
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test20:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: fcmovbe
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test20:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: fcmovbe
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test20:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define x86_fp80 @test21(i32 %a, i32 %b, x86_fp80 %x) nounwind {
|
|
|
|
%cmp = icmp sgt i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
|
|
|
|
ret x86_fp80 %sel
|
|
|
|
|
|
|
|
; We don't emit a branch for fp80, why?
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test21:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: testb
|
|
|
|
; SSE: fcmovne
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test21:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: testb
|
|
|
|
; NOSSE2: fcmovne
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test21:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: testb
|
|
|
|
; NOSSE1: fcmovne
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test21:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define x86_fp80 @test22(i32 %a, i32 %b, x86_fp80 %x) nounwind {
|
|
|
|
%cmp = icmp sge i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
|
|
|
|
ret x86_fp80 %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test22:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: testb
|
|
|
|
; SSE: fcmovne
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test22:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: testb
|
|
|
|
; NOSSE2: fcmovne
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test22:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: testb
|
|
|
|
; NOSSE1: fcmovne
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test22:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define x86_fp80 @test23(i32 %a, i32 %b, x86_fp80 %x) nounwind {
|
|
|
|
%cmp = icmp slt i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
|
|
|
|
ret x86_fp80 %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test23:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: testb
|
|
|
|
; SSE: fcmovne
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test23:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: testb
|
|
|
|
; NOSSE2: fcmovne
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test23:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: testb
|
|
|
|
; NOSSE1: fcmovne
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test23:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|
|
|
|
|
|
|
|
define x86_fp80 @test24(i32 %a, i32 %b, x86_fp80 %x) nounwind {
|
|
|
|
%cmp = icmp sle i32 %a, %b
|
|
|
|
%sel = select i1 %cmp, x86_fp80 0xK4005C600000000000000, x86_fp80 %x
|
|
|
|
ret x86_fp80 %sel
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; SSE-LABEL: test24:
|
2012-10-07 15:34:27 +00:00
|
|
|
; SSE: testb
|
|
|
|
; SSE: fcmovne
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE2-LABEL: test24:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE2: testb
|
|
|
|
; NOSSE2: fcmovne
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOSSE1-LABEL: test24:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOSSE1: testb
|
|
|
|
; NOSSE1: fcmovne
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NOCMOV-LABEL: test24:
|
2012-10-07 15:34:27 +00:00
|
|
|
; NOCMOV: fstp
|
|
|
|
}
|