[llvm] 97fc16e - [DAG] visitEXTRACT_VECTOR_ELT - share the same SDLoc instead of recreating it. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 05:40:00 PDT 2024
Author: Simon Pilgrim
Date: 2024-03-19T12:39:47Z
New Revision: 97fc16e14b16bd44dee1e1bf7211b4688b67027d
URL: https://github.com/llvm/llvm-project/commit/97fc16e14b16bd44dee1e1bf7211b4688b67027d
DIFF: https://github.com/llvm/llvm-project/commit/97fc16e14b16bd44dee1e1bf7211b4688b67027d.diff
LOG: [DAG] visitEXTRACT_VECTOR_ELT - share the same SDLoc instead of recreating 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 d6d0bf02c63975..cce765c7c3101a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -22443,17 +22443,16 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
// -> extract_vector_elt b, 0
// extract_vector_elt (concat_vectors v2i16:a, v2i16:b), 3
// -> extract_vector_elt b, 1
- SDLoc SL(N);
EVT ConcatVT = VecOp.getOperand(0).getValueType();
unsigned ConcatNumElts = ConcatVT.getVectorNumElements();
- SDValue NewIdx = DAG.getConstant(Elt % ConcatNumElts, SL,
+ SDValue NewIdx = DAG.getConstant(Elt % ConcatNumElts, DL,
Index.getValueType());
SDValue ConcatOp = VecOp.getOperand(Elt / ConcatNumElts);
- SDValue Elt = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SL,
+ SDValue Elt = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL,
ConcatVT.getVectorElementType(),
ConcatOp, NewIdx);
- return DAG.getNode(ISD::BITCAST, SL, ScalarVT, Elt);
+ return DAG.getNode(ISD::BITCAST, DL, ScalarVT, Elt);
}
// Make sure we found a non-volatile load and the extractelement is
More information about the llvm-commits
mailing list