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\$ | \
4 ; RUN: llc < %s -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math | \
5 ; RUN: grep fabs\$ | count 3
7 declare float @fabsf(float)
9 declare x86_fp80 @fabsl(x86_fp80)
11 define float @test1(float %X) {
12 %Y = call float @fabsf(float %X)
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
23 define x86_fp80 @test3(x86_fp80 %X) {
24 %Y = call x86_fp80 @fabsl(x86_fp80 %X)