[llvm] e1330d9 - [DAG] visitFMA/FDIV - avoid SDLoc duplication. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 18 03:58:33 PDT 2024
Author: Simon Pilgrim
Date: 2024-10-18T11:57:41+01:00
New Revision: e1330d96a086a9a3f6d8f11b8b8e3c2b6c500018
URL: https://github.com/llvm/llvm-project/commit/e1330d96a086a9a3f6d8f11b8b8e3c2b6c500018
DIFF: https://github.com/llvm/llvm-project/commit/e1330d96a086a9a3f6d8f11b8b8e3c2b6c500018.diff
LOG: [DAG] visitFMA/FDIV - avoid SDLoc duplication. NFC.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index ea869371ae107b..98eed6b7503d10 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -17398,14 +17398,14 @@ template <class MatchContextClass> SDValue DAGCombiner::visitFMA(SDNode *N) {
// FIXME: Support splat of constant.
if (N0CFP && N0CFP->isExactlyValue(1.0))
- return matcher.getNode(ISD::FADD, SDLoc(N), VT, N1, N2);
+ return matcher.getNode(ISD::FADD, DL, VT, N1, N2);
if (N1CFP && N1CFP->isExactlyValue(1.0))
- return matcher.getNode(ISD::FADD, SDLoc(N), VT, N0, N2);
+ return matcher.getNode(ISD::FADD, DL, VT, N0, N2);
// Canonicalize (fma c, x, y) -> (fma x, c, y)
if (DAG.isConstantFPBuildVectorOrConstantFP(N0) &&
!DAG.isConstantFPBuildVectorOrConstantFP(N1))
- return matcher.getNode(ISD::FMA, SDLoc(N), VT, N1, N0, N2);
+ return matcher.getNode(ISD::FMA, DL, VT, N1, N0, N2);
bool CanReassociate =
Options.UnsafeFPMath || N->getFlags().hasAllowReassociation();
@@ -17713,7 +17713,7 @@ SDValue DAGCombiner::visitFDIV(SDNode *N) {
TLI.getNegatedExpression(N1, DAG, LegalOperations, ForCodeSize, CostN1);
if (NegN1 && (CostN0 == TargetLowering::NegatibleCost::Cheaper ||
CostN1 == TargetLowering::NegatibleCost::Cheaper))
- return DAG.getNode(ISD::FDIV, SDLoc(N), VT, NegN0, NegN1);
+ return DAG.getNode(ISD::FDIV, DL, VT, NegN0, NegN1);
}
if (SDValue R = combineFMulOrFDivWithIntPow2(N))
More information about the llvm-commits
mailing list