llvm.org GIT mirror llvm / 446a4ea
new testcase to ensure fsqrt is generated for correct subtargets only, and that the fsqrt feature works. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23217 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 14 years ago
1 changed file(s) with 13 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; fsqrt should be generated when the fsqrt feature is enabled, but not
1 ; otherwise.
2
3 ; RUN: llvm-as < %s | llc -march=ppc32 -mattr=+fsqrt | grep 'fsqrt f1, f1' &&
4 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep 'fsqrt f1, f1' &&
5 ; RUN: llvm-as < %s | llc -march=ppc32 -mattr=-fsqrt | not grep 'fsqrt f1, f1' &&
6 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g4 | not grep 'fsqrt f1, f1'
7
8 declare double %llvm.sqrt(double)
9 double %X(double %Y) {
10 %Z = call double %llvm.sqrt(double %Y)
11 ret double %Z
12 }