1 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse1,+sse2 | grep mins | wc -l | grep 2 &&
2 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse1,+sse2 | grep maxs | wc -l | grep 2
4 declare bool %llvm.isunordered.f64( double %x, double %y )
5 declare bool %llvm.isunordered.f32( float %x, float %y )
9 float %min1(float %x, float %y) {
10 %tmp = setlt float %x, %y ; <bool> [#uses=1]
11 %retval = select bool %tmp, float %x, float %y ; <float> [#uses=1]
14 double %min2(double %x, double %y) {
15 %tmp = setlt double %x, %y
16 %retval = select bool %tmp, double %x, double %y
20 float %max1(float %x, float %y) {
21 %tmp = setge float %x, %y ; <bool> [#uses=1]
22 %tmp2 = tail call bool %llvm.isunordered.f32( float %x, float %y )
23 %tmp3 = or bool %tmp2, %tmp ; <bool> [#uses=1]
24 %retval = select bool %tmp3, float %x, float %y
28 double %max2(double %x, double %y) {
29 %tmp = setge double %x, %y ; <bool> [#uses=1]
30 %tmp2 = tail call bool %llvm.isunordered.f64( double %x, double %y )
31 %tmp3 = or bool %tmp2, %tmp ; <bool> [#uses=1]
32 %retval = select bool %tmp3, double %x, double %y