diff options
author | Lang Hames <lhames@gmail.com> | 2012-06-19 22:51:23 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2012-06-19 22:51:23 +0000 |
commit | 39fb1d08dce7b7c78a9633ce32c5610d72d1996a (patch) | |
tree | 5ce060817ee61c35a865fce016bc1d7fa2020fe4 /llvm/test/CodeGen/PowerPC/ppc440-fp-basic.ll | |
parent | 63d40202fb478b331abeddcf2b12517f42db0f86 (diff) | |
download | bcm5719-llvm-39fb1d08dce7b7c78a9633ce32c5610d72d1996a.tar.gz bcm5719-llvm-39fb1d08dce7b7c78a9633ce32c5610d72d1996a.zip |
Add DAG-combines for aggressive FMA formation.
This patch adds DAG combines to form FMAs from pairs of FADD + FMUL or
FSUB + FMUL. The combines are performed when:
(a) Either
AllowExcessFPPrecision option (-enable-excess-fp-precision for llc)
OR
UnsafeFPMath option (-enable-unsafe-fp-math)
are set, and
(b) TargetLoweringInfo::isFMAFasterThanMulAndAdd(VT) is true for the type of
the FADD/FSUB, and
(c) The FMUL only has one user (the FADD/FSUB).
If your target has fast FMA instructions you can make use of these combines by
overriding TargetLoweringInfo::isFMAFasterThanMulAndAdd(VT) to return true for
types supported by your FMA instruction, and adding patterns to match ISD::FMA
to your FMA instructions.
llvm-svn: 158757
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/ppc440-fp-basic.ll')
-rw-r--r-- | llvm/test/CodeGen/PowerPC/ppc440-fp-basic.ll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/PowerPC/ppc440-fp-basic.ll b/llvm/test/CodeGen/PowerPC/ppc440-fp-basic.ll index 1fad2fa3aaf..25ec5f892c5 100644 --- a/llvm/test/CodeGen/PowerPC/ppc440-fp-basic.ll +++ b/llvm/test/CodeGen/PowerPC/ppc440-fp-basic.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=ppc32 -mcpu=440 | FileCheck %s +; RUN: llc < %s -march=ppc32 -mcpu=440 -enable-excess-fp-precision | FileCheck %s %0 = type { double, double } |