blob: 74a8725eb12e30a4e3ee2c3ad544b2d6e189bb1f [file] [log] [blame]
Chris Lattner446a4ea2005-09-02 18:32:22 +00001; fsqrt should be generated when the fsqrt feature is enabled, but not
2; otherwise.
3
Dan Gohmanb7c0b242009-09-11 18:36:27 +00004; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=+fsqrt | \
Reid Spencerc58ef012007-04-15 21:17:45 +00005; RUN: grep {fsqrt f1, f1}
Dan Gohmanb7c0b242009-09-11 18:36:27 +00006; 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 | \
Reid Spencerc58ef012007-04-15 21:17:45 +00009; RUN: not grep {fsqrt f1, f1}
Dan Gohmanb7c0b242009-09-11 18:36:27 +000010; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g4 | \
Reid Spencerc58ef012007-04-15 21:17:45 +000011; RUN: not grep {fsqrt f1, f1}
Chris Lattner446a4ea2005-09-02 18:32:22 +000012
Tanya Lattnercfab3da2008-02-19 08:07:33 +000013declare 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
Chris Lattner446a4ea2005-09-02 18:32:22 +000018}
Tanya Lattnercfab3da2008-02-19 08:07:33 +000019