Skip to content

Commit 97fc16e

Browse files
committed
[DAG] visitEXTRACT_VECTOR_ELT - share the same SDLoc instead of recreating it. NFC.
1 parent 4e612a6 commit 97fc16e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22443,17 +22443,16 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
2244322443
// -> extract_vector_elt b, 0
2244422444
// extract_vector_elt (concat_vectors v2i16:a, v2i16:b), 3
2244522445
// -> extract_vector_elt b, 1
22446-
SDLoc SL(N);
2244722446
EVT ConcatVT = VecOp.getOperand(0).getValueType();
2244822447
unsigned ConcatNumElts = ConcatVT.getVectorNumElements();
22449-
SDValue NewIdx = DAG.getConstant(Elt % ConcatNumElts, SL,
22448+
SDValue NewIdx = DAG.getConstant(Elt % ConcatNumElts, DL,
2245022449
Index.getValueType());
2245122450

2245222451
SDValue ConcatOp = VecOp.getOperand(Elt / ConcatNumElts);
22453-
SDValue Elt = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SL,
22452+
SDValue Elt = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL,
2245422453
ConcatVT.getVectorElementType(),
2245522454
ConcatOp, NewIdx);
22456-
return DAG.getNode(ISD::BITCAST, SL, ScalarVT, Elt);
22455+
return DAG.getNode(ISD::BITCAST, DL, ScalarVT, Elt);
2245722456
}
2245822457

2245922458
// Make sure we found a non-volatile load and the extractelement is

0 commit comments

Comments
 (0)