Merging r259740:
[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: llc < %s -mattr=-vsx -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=+fsqrt | \
5 ; RUN:   grep "fsqrt f1, f1"
6 ; RUN: llc < %s -mattr=-vsx -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
7 ; RUN:   grep "fsqrt f1, f1"
8 ; RUN: llc < %s -mattr=-vsx -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-fsqrt | \
9 ; RUN:   not grep "fsqrt f1, f1"
10 ; RUN: llc < %s -mattr=-vsx -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g4 | \
11 ; RUN:   not grep "fsqrt f1, f1"
12
13 declare double @llvm.sqrt.f64(double)
14
15 define double @X(double %Y) {
16         %Z = call double @llvm.sqrt.f64( double %Y )            ; <double> [#uses=1]
17         ret double %Z
18 }
19