[llvm] 51388fb - [DAG] visitSub - reuse existing SDLoc instead of regenerating it. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 27 05:22:59 PDT 2024
Author: Simon Pilgrim
Date: 2024-03-27T12:22:30Z
New Revision: 51388fbab1b9454dfe24c4ac1c8b4a009162386a
URL: https://github.com/llvm/llvm-project/commit/51388fbab1b9454dfe24c4ac1c8b4a009162386a
DIFF: https://github.com/llvm/llvm-project/commit/51388fbab1b9454dfe24c4ac1c8b4a009162386a.diff
LOG: [DAG] visitSub - reuse existing SDLoc instead of regenerating it. 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 39ee95d7007ce6..a021e0e19fc3cf 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -3884,7 +3884,7 @@ SDValue DAGCombiner::visitSUB(SDNode *N) {
if (SDValue V = foldSubToAvg(N, DL))
return V;
- if (SDValue V = foldAddSubMasked1(false, N0, N1, DAG, SDLoc(N)))
+ if (SDValue V = foldAddSubMasked1(false, N0, N1, DAG, DL))
return V;
if (SDValue V = foldSubToUSubSat(VT, N, DL))
@@ -3949,7 +3949,7 @@ SDValue DAGCombiner::visitSUB(SDNode *N) {
if ((X0 == S0 && X1 == N1) || (X0 == N1 && X1 == S0))
if (ConstantSDNode *C = isConstOrConstSplat(N1.getOperand(1)))
if (C->getAPIntValue() == (BitWidth - 1))
- return DAG.getNode(ISD::ABS, SDLoc(N), VT, S0);
+ return DAG.getNode(ISD::ABS, DL, VT, S0);
}
}
More information about the llvm-commits
mailing list