1; fsqrt should be generated when the fsqrt feature is enabled, but not
2; otherwise.
3
4; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-unknown-linux-gnu -mattr=+fsqrt | FileCheck %s -check-prefix=SQRT
5; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-unknown-linux-gnu -mattr=-fsqrt | FileCheck %s -check-prefix=NSQRT
6
7; SQRT: X:
8; SQRT: fsqrt 1, 1
9; SQRT: blr
10
11; NSQRT: X:
12; NSQRT-NOT: fsqrt 1, 1
13; NSQRT: blr
14
15declare double @llvm.sqrt.f64(double)
16
17define double @X(double %Y) {
18        %Z = call double @llvm.sqrt.f64( double %Y )            ; <double> [#uses=1]
19        ret double %Z
20}
21
22