Index: lib/CodeGen/SelectionDAG/DAGCombiner.cpp =================================================================== --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -6955,7 +6955,11 @@ if (isa(N0) && isa(N1) && isa(N2)) { - return DAG.getNode(ISD::FMA, dl, VT, N0, N1, N2); + APFloat CstLHS = cast(N0)->getValueAPF(); + APFloat CstMHS = cast(N1)->getValueAPF(); + APFloat CstRHS = cast(N2)->getValueAPF(); + CstLHS.fusedMultiplyAdd(CstMHS, CstRHS, APFloat::rmNearestTiesToEven); + return DAG.getConstantFP(CstLHS, VT); } if (DAG.getTarget().Options.UnsafeFPMath) {