summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2012-06-19 22:51:23 +0000
committerLang Hames <lhames@gmail.com>2012-06-19 22:51:23 +0000
commit39fb1d08dce7b7c78a9633ce32c5610d72d1996a (patch)
tree5ce060817ee61c35a865fce016bc1d7fa2020fe4 /llvm/lib/CodeGen/MachineFunction.cpp
parent63d40202fb478b331abeddcf2b12517f42db0f86 (diff)
downloadbcm5719-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
OpenPOWER on IntegriCloud