Arrange to print constants that match "n" and "i" constraints
[oota-llvm.git] / test / CodeGen / PowerPC / fsqrt.ll
1 ; fsqrt should be generated when the fsqrt feature is enabled, but not 
2 ; otherwise.
3
4 ; RUN: llvm-as < %s | \
5 ; RUN:   llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=+fsqrt | \
6 ; RUN:   grep {fsqrt f1, f1}
7 ; RUN: llvm-as < %s | \
8 ; RUN:  llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
9 ; RUN:  grep {fsqrt f1, f1}
10 ; RUN: llvm-as < %s | \
11 ; RUN:   llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-fsqrt | \
12 ; RUN:   not grep {fsqrt f1, f1}
13 ; RUN: llvm-as < %s | \
14 ; RUN:   llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g4 | \
15 ; RUN:   not grep {fsqrt f1, f1}
16
17 declare double @llvm.sqrt.f64(double)
18
19 define double @X(double %Y) {
20         %Z = call double @llvm.sqrt.f64( double %Y )            ; <double> [#uses=1]
21         ret double %Z
22 }
23