@@ -51225,7 +51225,8 @@ static SDValue combineBitOpWithPACK(unsigned Opc, const SDLoc &DL, EVT VT,
51225
51225
/// If this is a zero/all-bits result that is bitwise-anded with a low bits
51226
51226
/// mask. (Mask == 1 for the x86 lowering of a SETCC + ZEXT), replace the 'and'
51227
51227
/// 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,
51229
51230
const X86Subtarget &Subtarget) {
51230
51231
SDValue Op0 = peekThroughBitcasts(N->getOperand(0));
51231
51232
SDValue Op1 = peekThroughBitcasts(N->getOperand(1));
@@ -51255,7 +51256,6 @@ static SDValue combineAndMaskToShift(SDNode *N, SelectionDAG &DAG,
51255
51256
Y = Op1;
51256
51257
}
51257
51258
if (X && Y) {
51258
- SDLoc DL(N);
51259
51259
SDValue Sra =
51260
51260
getTargetVShiftByConstNode(X86ISD::VSRAI, DL, VT.getSimpleVT(), X,
51261
51261
VT.getScalarSizeInBits() - 1, DAG);
@@ -51278,7 +51278,6 @@ static SDValue combineAndMaskToShift(SDNode *N, SelectionDAG &DAG,
51278
51278
if (EltBitWidth != DAG.ComputeNumSignBits(Op0))
51279
51279
return SDValue();
51280
51280
51281
- SDLoc DL(N);
51282
51281
unsigned ShiftVal = SplatVal.countr_one();
51283
51282
SDValue ShAmt = DAG.getTargetConstant(EltBitWidth - ShiftVal, DL, MVT::i8);
51284
51283
SDValue Shift = DAG.getNode(X86ISD::VSRLI, DL, VT, Op0, ShAmt);
@@ -51845,7 +51844,7 @@ static SDValue combineAnd(SDNode *N, SelectionDAG &DAG,
51845
51844
if (SDValue R = combineAndNotIntoANDNP(N, DAG))
51846
51845
return R;
51847
51846
51848
- if (SDValue ShiftRight = combineAndMaskToShift(N, DAG, Subtarget))
51847
+ if (SDValue ShiftRight = combineAndMaskToShift(N, dl, DAG, Subtarget))
51849
51848
return ShiftRight;
51850
51849
51851
51850
if (SDValue R = combineAndLoadToBZHI(N, DAG, Subtarget))
0 commit comments