From d693cafcfb9e67ba7040cb810e4409a166421482 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Tue, 19 Jun 2012 22:51:23 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158757 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llc/llc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index d0880913ba..b303cec3b5 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -156,8 +156,8 @@ DisableFPElimNonLeaf("disable-non-leaf-fp-elim", cl::init(false)); static cl::opt -DisableExcessPrecision("disable-excess-fp-precision", - cl::desc("Disable optimizations that may increase FP precision"), +EnableExcessPrecision("enable-excess-fp-precision", + cl::desc("Enable optimizations that may increase FP precision"), cl::init(false)); static cl::opt @@ -404,7 +404,7 @@ int main(int argc, char **argv) { Options.LessPreciseFPMADOption = EnableFPMAD; Options.NoFramePointerElim = DisableFPElim; Options.NoFramePointerElimNonLeaf = DisableFPElimNonLeaf; - Options.NoExcessFPPrecision = DisableExcessPrecision; + Options.AllowExcessFPPrecision = EnableExcessPrecision; Options.UnsafeFPMath = EnableUnsafeFPMath; Options.NoInfsFPMath = EnableNoInfsFPMath; Options.NoNaNsFPMath = EnableNoNaNsFPMath; -- cgit v1.2.3