brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 6a619f7 Raw
54 lines · plain
1; RUN: llc < %s -mtriple=i686-- -mattr=+sse,+sse2 | FileCheck %s2 3define float @min1(float %x, float %y) {4; CHECK-LABEL: min15; CHECK: mins6	%tmp = fcmp olt float %x, %y7	%retval = select i1 %tmp, float %x, float %y8	ret float %retval9}10 11define double @min2(double %x, double %y) {12; CHECK-LABEL: min213; CHECK: mins14	%tmp = fcmp olt double %x, %y15	%retval = select i1 %tmp, double %x, double %y16	ret double %retval17}18 19declare <4 x float> @llvm.x86.sse.min.ss(<4 x float>, <4 x float>)20define <4 x float> @min3(float %x, float %y) {21; CHECK-LABEL: min322; CHECK: mins23	%vec0 = insertelement <4 x float> undef, float %x, i32 024	%vec1 = insertelement <4 x float> undef, float %y, i32 025	%retval = tail call <4 x float> @llvm.x86.sse.min.ss(<4 x float> %vec0, <4 x float> %vec1)26	ret <4 x float> %retval27}28 29define float @max1(float %x, float %y) {30; CHECK-LABEL: max131; CHECK: maxs32	%tmp = fcmp uge float %x, %y33	%retval = select i1 %tmp, float %x, float %y34	ret float %retval35}36 37define double @max2(double %x, double %y) {38; CHECK-LABEL: max239; CHECK: maxs40	%tmp = fcmp uge double %x, %y41	%retval = select i1 %tmp, double %x, double %y42	ret double %retval43}44 45declare <4 x float> @llvm.x86.sse.max.ss(<4 x float>, <4 x float>)46define <4 x float> @max3(float %x, float %y) {47; CHECK-LABEL: max348; CHECK: maxs49	%vec0 = insertelement <4 x float> undef, float %x, i32 050	%vec1 = insertelement <4 x float> undef, float %y, i32 051	%retval = tail call <4 x float> @llvm.x86.sse.max.ss(<4 x float> %vec0, <4 x float> %vec1)52	ret <4 x float> %retval53}54