1 ; RUN: llc < %s -mtriple=i686-- -mattr=+sse,+sse2 | FileCheck %s
3 define float @min1(float %x, float %y) {
6 %tmp = fcmp olt float %x, %y
7 %retval = select i1 %tmp, float %x, float %y
11 define double @min2(double %x, double %y) {
14 %tmp = fcmp olt double %x, %y
15 %retval = select i1 %tmp, double %x, double %y
19 declare <4 x float> @llvm.x86.sse.min.ss(<4 x float>, <4 x float>)
20 define <4 x float> @min3(float %x, float %y) {
23 %vec0 = insertelement <4 x float> undef, float %x, i32 0
24 %vec1 = insertelement <4 x float> undef, float %y, i32 0
25 %retval = tail call <4 x float> @llvm.x86.sse.min.ss(<4 x float> %vec0, <4 x float> %vec1)
26 ret <4 x float> %retval
29 define float @max1(float %x, float %y) {
32 %tmp = fcmp uge float %x, %y
33 %retval = select i1 %tmp, float %x, float %y
37 define double @max2(double %x, double %y) {
40 %tmp = fcmp uge double %x, %y
41 %retval = select i1 %tmp, double %x, double %y
45 declare <4 x float> @llvm.x86.sse.max.ss(<4 x float>, <4 x float>)
46 define <4 x float> @max3(float %x, float %y) {
49 %vec0 = insertelement <4 x float> undef, float %x, i32 0
50 %vec1 = insertelement <4 x float> undef, float %y, i32 0
51 %retval = tail call <4 x float> @llvm.x86.sse.max.ss(<4 x float> %vec0, <4 x float> %vec1)
52 ret <4 x float> %retval