1; fsqrt should be generated when the fsqrt feature is enabled, but not
2; otherwise.
3
4; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=+fsqrt | \
5; RUN:   grep "fsqrt f1, f1"
6; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
7; RUN:   grep "fsqrt f1, f1"
8; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-fsqrt | \
9; RUN:   not grep "fsqrt f1, f1"
10; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g4 | \
11; RUN:   not grep "fsqrt f1, f1"
12
13declare double @llvm.sqrt.f64(double)
14
15define double @X(double %Y) {
16        %Z = call double @llvm.sqrt.f64( double %Y )            ; <double> [#uses=1]
17        ret double %Z
18}
19
20