Convert tests using "| wc -l | grep ..." to use the count script.
[oota-llvm.git] / test / CodeGen / X86 / fabs.ll
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\$ | count 1
4 ; RUN: llvm-upgrade < %s | llvm-as | \
5 ; RUN:   llc -march=x86 -mattr=-sse2,-sse3 -enable-unsafe-fp-math  | \
6 ; RUN:   grep fabs\$ | count 2
7
8 target endian = little
9 target pointersize = 32
10
11 declare float %fabsf(float)
12
13 float %test1(float %X) {
14         %Y = call float %fabsf(float %X)
15         ret float %Y
16 }
17
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
22         ret double %Q
23 }
24