[llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/fsqrt.ll

Chris Lattner lattner at cs.uiuc.edu
Fri Sep 2 11:32:33 PDT 2005



Changes in directory llvm/test/Regression/CodeGen/PowerPC:

fsqrt.ll added (r1.1)
---
Log message:

new testcase to ensure fsqrt is generated for correct subtargets only, and
that the fsqrt feature works.


---
Diffs of the changes:  (+13 -0)

 fsqrt.ll |   13 +++++++++++++
 1 files changed, 13 insertions(+)


Index: llvm/test/Regression/CodeGen/PowerPC/fsqrt.ll
diff -c /dev/null llvm/test/Regression/CodeGen/PowerPC/fsqrt.ll:1.1
*** /dev/null	Fri Sep  2 13:32:32 2005
--- llvm/test/Regression/CodeGen/PowerPC/fsqrt.ll	Fri Sep  2 13:32:22 2005
***************
*** 0 ****
--- 1,13 ----
+ ; fsqrt should be generated when the fsqrt feature is enabled, but not 
+ ; otherwise.
+ 
+ ; RUN: llvm-as < %s | llc -march=ppc32 -mattr=+fsqrt | grep 'fsqrt f1, f1' &&
+ ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5      | grep 'fsqrt f1, f1' &&
+ ; RUN: llvm-as < %s | llc -march=ppc32 -mattr=-fsqrt | not grep 'fsqrt f1, f1' &&
+ ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g4 | not grep 'fsqrt f1, f1'
+ 
+ declare double %llvm.sqrt(double)
+ double %X(double %Y) {
+ 	%Z = call double %llvm.sqrt(double %Y)
+ 	ret double %Z
+ }






More information about the llvm-commits mailing list