@@ -51225,7 +51225,8 @@ static SDValue combineBitOpWithPACK(unsigned Opc, const SDLoc &DL, EVT VT,
5122551225/// If this is a zero/all-bits result that is bitwise-anded with a low bits
5122651226/// mask. (Mask == 1 for the x86 lowering of a SETCC + ZEXT), replace the 'and'
5122751227/// with a shift-right to eliminate loading the vector constant mask value.
51228- static SDValue combineAndMaskToShift(SDNode *N, SelectionDAG &DAG,
51228+ static SDValue combineAndMaskToShift(SDNode *N, const SDLoc &DL,
51229+ SelectionDAG &DAG,
5122951230 const X86Subtarget &Subtarget) {
5123051231 SDValue Op0 = peekThroughBitcasts(N->getOperand(0));
5123151232 SDValue Op1 = peekThroughBitcasts(N->getOperand(1));
@@ -51255,7 +51256,6 @@ static SDValue combineAndMaskToShift(SDNode *N, SelectionDAG &DAG,
5125551256 Y = Op1;
5125651257 }
5125751258 if (X && Y) {
51258- SDLoc DL(N);
5125951259 SDValue Sra =
5126051260 getTargetVShiftByConstNode(X86ISD::VSRAI, DL, VT.getSimpleVT(), X,
5126151261 VT.getScalarSizeInBits() - 1, DAG);
@@ -51278,7 +51278,6 @@ static SDValue combineAndMaskToShift(SDNode *N, SelectionDAG &DAG,
5127851278 if (EltBitWidth != DAG.ComputeNumSignBits(Op0))
5127951279 return SDValue();
5128051280
51281- SDLoc DL(N);
5128251281 unsigned ShiftVal = SplatVal.countr_one();
5128351282 SDValue ShAmt = DAG.getTargetConstant(EltBitWidth - ShiftVal, DL, MVT::i8);
5128451283 SDValue Shift = DAG.getNode(X86ISD::VSRLI, DL, VT, Op0, ShAmt);
@@ -51845,7 +51844,7 @@ static SDValue combineAnd(SDNode *N, SelectionDAG &DAG,
5184551844 if (SDValue R = combineAndNotIntoANDNP(N, DAG))
5184651845 return R;
5184751846
51848- if (SDValue ShiftRight = combineAndMaskToShift(N, DAG, Subtarget))
51847+ if (SDValue ShiftRight = combineAndMaskToShift(N, dl, DAG, Subtarget))
5184951848 return ShiftRight;
5185051849
5185151850 if (SDValue R = combineAndLoadToBZHI(N, DAG, Subtarget))
0 commit comments