blob: 29eed4edace866ba80ecb194b979fcecbe6699cd [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
4; RUN: llvm-as < %s | llc -march=ppc32 -mattr=+fsqrt | grep 'fsqrt f1, f1' &&
5; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep 'fsqrt f1, f1' &&
6; RUN: llvm-as < %s | llc -march=ppc32 -mattr=-fsqrt | not grep 'fsqrt f1, f1' &&
7; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g4 | not grep 'fsqrt f1, f1'
8
9declare double %llvm.sqrt(double)
10double %X(double %Y) {
11 %Z = call double %llvm.sqrt(double %Y)
12 ret double %Z
13}