diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2012-04-11 22:59:08 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-04-11 22:59:08 +0000 |
commit | 1cc6333161be8bbeb516bc7c74d4400dca58b997 (patch) | |
tree | 10311c6783788ad8f5e1e8492ce3aea57d083b40 /test | |
parent | c12a6e6b53bb6df62a0020bda91206fd149c430a (diff) | |
download | llvm-1cc6333161be8bbeb516bc7c74d4400dca58b997.tar.gz llvm-1cc6333161be8bbeb516bc7c74d4400dca58b997.tar.bz2 llvm-1cc6333161be8bbeb516bc7c74d4400dca58b997.tar.xz |
Emit neg.s or neg.d only if -enable-no-nans-fp-math is supplied by user,
otherwise expand FNEG during legalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/Mips/fneg.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/fneg.ll b/test/CodeGen/Mips/fneg.ll new file mode 100644 index 0000000000..162146f183 --- /dev/null +++ b/test/CodeGen/Mips/fneg.ll @@ -0,0 +1,17 @@ +; RUN: llc < %s -march=mipsel -mcpu=mips32 | FileCheck %s + +define float @foo0(i32 %a, float %d) nounwind readnone { +entry: +; CHECK-NOT: fabs.s + %sub = fsub float -0.000000e+00, %d + ret float %sub +} + +define double @foo1(i32 %a, double %d) nounwind readnone { +entry: +; CHECK: foo1 +; CHECK-NOT: fabs.d +; CHECK: jr + %sub = fsub double -0.000000e+00, %d + ret double %sub +} |