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/lib/CodeGen/MachineFunction.cpp | |
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/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions