1 ; Make sure this testcase codegens to the fabs instruction, not a call to fabsf 2 ; RUN: llc < %s -march=x86 -mattr=-sse2,-sse3,-sse | grep fabs\$ | \ 3 ; RUN: count 2 4 ; RUN: llc < %s -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math -enable-no-nans-fp-math | \ 5 ; RUN: grep fabs\$ | count 3 6 7 declare float @fabsf(float) 8 9 declare x86_fp80 @fabsl(x86_fp80) 10 11 define float @test1(float %X) { 12 %Y = call float @fabsf(float %X) 13 ret float %Y 14 } 15 16 define double @test2(double %X) { 17 %Y = fcmp oge double %X, -0.0 18 %Z = fsub double -0.0, %X 19 %Q = select i1 %Y, double %X, double %Z 20 ret double %Q 21 } 22 23 define x86_fp80 @test3(x86_fp80 %X) { 24 %Y = call x86_fp80 @fabsl(x86_fp80 %X) 25 ret x86_fp80 %Y 26 } 27 28 29