1 ; Make sure this testcase codegens to the fabs instruction, not a call to fabsf
2 ; RUN: llvm-as < %s | llc -march=x86 -mattr=-sse2,-sse3,-sse | grep fabs\$ | \
4 ; RUN: llvm-as < %s | \
5 ; RUN: llc -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math | \
6 ; RUN: grep fabs\$ | count 3
8 declare float @fabsf(float)
10 declare x86_fp80 @fabsl(x86_fp80)
12 define float @test1(float %X) {
13 %Y = call float @fabsf(float %X)
17 define double @test2(double %X) {
18 %Y = fcmp oge double %X, -0.0
19 %Z = sub double -0.0, %X
20 %Q = select i1 %Y, double %X, double %Z
24 define x86_fp80 @test3(x86_fp80 %X) {
25 %Y = call x86_fp80 @fabsl(x86_fp80 %X)