1 ; Make sure this testcase codegens to the fabs instruction, not a call to fabsf
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 | \
3 ; RUN: grep fabs\$ | wc -l | grep 1
4 ; RUN: llvm-upgrade < %s | llvm-as | \
5 ; RUN: llc -march=x86 -mattr=-sse2,-sse3 -enable-unsafe-fp-math | \
6 ; RUN: grep fabs\$ | wc -l | grep 2
9 target pointersize = 32
11 declare float %fabsf(float)
13 float %test1(float %X) {
14 %Y = call float %fabsf(float %X)
18 double %test2(double %X) {
19 %Y = setge double %X, -0.0
20 %Z = sub double -0.0, %X
21 %Q = select bool %Y, double %X, double %Z