blob: 1260c602f9d9c679ab7cef0dc44835b1ae627d37 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; fsqrt should be generated when the fsqrt feature is enabled, but not
2; otherwise.
3
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +00004; RUN: llvm-as < %s | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=+fsqrt | \
6; RUN: grep {fsqrt f1, f1}
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +00007; RUN: llvm-as < %s | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00008; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
9; RUN: grep {fsqrt f1, f1}
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +000010; RUN: llvm-as < %s | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-fsqrt | \
12; RUN: not grep {fsqrt f1, f1}
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +000013; RUN: llvm-as < %s | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +000014; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g4 | \
15; RUN: not grep {fsqrt f1, f1}
16
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +000017declare double @llvm.sqrt.f64(double)
18
19define double @X(double %Y) {
20 %Z = call double @llvm.sqrt.f64( double %Y ) ; <double> [#uses=1]
21 ret double %Z
Dan Gohmanf17a25c2007-07-18 16:29:46 +000022}
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +000023