Skip to content

Commit

Permalink
llvm.fmuladd.* lowering should be checking isOperationLegalOrCustom, …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
lhames committed Nov 22, 2012
1 parent b9a12ea commit b47ec40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit b47ec40

Please sign in to comment.