@@ -22226,7 +22226,7 @@ SDValue DAGCombiner::scalarizeExtractedVectorLoad(SDNode *EVE, EVT InVecVT,
2222622226/// Transform a vector binary operation into a scalar binary operation by moving
2222722227/// the math/logic after an extract element of a vector.
2222822228static SDValue scalarizeExtractedBinop(SDNode *ExtElt, SelectionDAG &DAG,
22229- bool LegalOperations) {
22229+ const SDLoc &DL, bool LegalOperations) {
2223022230 const TargetLowering &TLI = DAG.getTargetLoweringInfo();
2223122231 SDValue Vec = ExtElt->getOperand(0);
2223222232 SDValue Index = ExtElt->getOperand(1);
@@ -22251,7 +22251,6 @@ static SDValue scalarizeExtractedBinop(SDNode *ExtElt, SelectionDAG &DAG,
2225122251 ISD::isConstantSplatVector(Op1.getNode(), SplatVal)) {
2225222252 // extractelt (binop X, C), IndexC --> binop (extractelt X, IndexC), C'
2225322253 // extractelt (binop C, X), IndexC --> binop C', (extractelt X, IndexC)
22254- SDLoc DL(ExtElt);
2225522254 EVT VT = ExtElt->getValueType(0);
2225622255 SDValue Ext0 = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, VT, Op0, Index);
2225722256 SDValue Ext1 = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, VT, Op1, Index);
@@ -22490,7 +22489,7 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
2249022489 }
2249122490 }
2249222491
22493- if (SDValue BO = scalarizeExtractedBinop(N, DAG, LegalOperations))
22492+ if (SDValue BO = scalarizeExtractedBinop(N, DAG, DL, LegalOperations))
2249422493 return BO;
2249522494
2249622495 if (VecVT.isScalableVector())
0 commit comments