From: Lang Hames Date: Thu, 22 Nov 2012 03:31:45 +0000 (+0000) Subject: llvm.fmuladd.* lowering should be checking isOperationLegalOrCustom, rather than X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b47ec4087cc1d4cdc647cce7acf03b5c34f91722;p=oota-llvm.git llvm.fmuladd.* lowering should be checking isOperationLegalOrCustom, rather than isOperationLegal. Thanks to Craig Topper for pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168485 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 3396d648530..ae94d1e6661 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -4994,7 +4994,7 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) { case Intrinsic::fmuladd: { EVT VT = TLI.getValueType(I.getType()); if (TM.Options.AllowFPOpFusion != FPOpFusion::Strict && - TLI.isOperationLegal(ISD::FMA, VT) && + TLI.isOperationLegalOrCustom(ISD::FMA, VT) && TLI.isFMAFasterThanMulAndAdd(VT)){ setValue(&I, DAG.getNode(ISD::FMA, dl, getValue(I.getArgOperand(0)).getValueType(),