@@ -30224,8 +30224,7 @@ static SDValue LowerShift(SDValue Op, const X86Subtarget &Subtarget,
3022430224 // another. The construction of this mask will be constant folded.
3022530225 // The mask for a logical right shift is nearly identical, the only
3022630226 // difference is that the all ones mask is shifted right instead of left.
30227- SDValue CstFullMask = DAG.getAllOnesConstant(dl, NarrowScalarVT);
30228- SDValue SplatFullMask = DAG.getSplat(VT, dl, CstFullMask);
30227+ SDValue SplatFullMask = DAG.getAllOnesConstant(dl, VT);
3022930228 SDValue Mask = DAG.getNode(LogicalOpc, dl, VT, SplatFullMask, Amt);
3023030229 Mask = DAG.getBitcast(WideVT, Mask);
3023130230 // Finally, we mask the shifted vector with the SWAR mask.
@@ -30258,9 +30257,8 @@ static SDValue LowerShift(SDValue Op, const X86Subtarget &Subtarget,
3025830257 //
3025930258 // This is equal to Masked - 2*SignBitMask which will correctly sign
3026030259 // extend our result.
30261- SDValue CstHighBit =
30262- DAG.getConstant(1ULL << (EltSizeInBits - 1), dl, NarrowScalarVT);
30263- SDValue SplatHighBit = DAG.getSplat(VT, dl, CstHighBit);
30260+ SDValue SplatHighBit =
30261+ DAG.getConstant(APInt::getSignMask(EltSizeInBits), dl, VT);
3026430262 // This does not induce recursion, all operands are constants.
3026530263 SDValue SignBitMask = DAG.getNode(LogicalOpc, dl, VT, SplatHighBit, Amt);
3026630264 SDValue FlippedSignBit =
0 commit comments