diff options
author | Chris Lattner <sabre@nondot.org> | 2005-09-02 18:32:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-09-02 18:32:22 +0000 |
commit | 446a4eaee5471b81c83fa449bf4dd1f5e14c3914 (patch) | |
tree | 9e8e6101563952897591722163e0d6edcf8dcbdb | |
parent | 0271077eba5f62796f4c725baa8e7fc88bf97650 (diff) |
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
-rw-r--r-- | test/CodeGen/PowerPC/fsqrt.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/fsqrt.ll b/test/CodeGen/PowerPC/fsqrt.ll new file mode 100644 index 0000000000..29eed4edac --- /dev/null +++ b/test/CodeGen/PowerPC/fsqrt.ll @@ -0,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 +} |