Lines Matching defs:ShAmt
604 unsigned ShAmt = SA->getZExtValue();
608 if (ShAmt >= BitWidth)
611 // If this is ((X >>u C1) << ShAmt), see if we can simplify this into a
616 if (ShAmt && (NewMask & APInt::getLowBitsSet(BitWidth, ShAmt)) == 0) {
619 int Diff = ShAmt-C1;
633 if (SimplifyDemandedBits(InOp, NewMask.lshr(ShAmt),
643 if (ShAmt < InnerBits && NewMask.lshr(InnerBits) == 0 &&
646 if (!APInt(BitWidth, ShAmt).isIntN(ShTy.getSizeInBits()))
650 TLO.DAG.getConstant(ShAmt, ShTy));
667 if (InnerShAmt < ShAmt &&
669 NewMask.lshr(InnerBits - InnerShAmt + ShAmt) == 0 &&
670 NewMask.trunc(ShAmt) == 0) {
672 TLO.DAG.getConstant(ShAmt - InnerShAmt,
692 unsigned ShAmt = SA->getZExtValue();
697 if (ShAmt >= BitWidth)
700 // If this is ((X << C1) >>u ShAmt), see if we can simplify this into a
705 if (ShAmt && (NewMask & APInt::getHighBitsSet(VTSize, ShAmt)) == 0) {
708 int Diff = ShAmt-C1;
722 if (SimplifyDemandedBits(InOp, (NewMask << ShAmt),
726 KnownZero = KnownZero.lshr(ShAmt);
727 KnownOne = KnownOne.lshr(ShAmt);
729 APInt HighBits = APInt::getHighBitsSet(BitWidth, ShAmt);
745 unsigned ShAmt = SA->getZExtValue();
748 if (ShAmt >= BitWidth)
751 APInt InDemandedMask = (NewMask << ShAmt);
755 APInt HighBits = APInt::getHighBitsSet(BitWidth, ShAmt);
763 KnownZero = KnownZero.lshr(ShAmt);
764 ShAmt);
767 APInt SignBit = APInt::getSignBit(BitWidth).lshr(ShAmt);
797 unsigned ShAmt = ExVT.getScalarType().getSizeInBits();
806 SDValue ShiftAmt = TLO.DAG.getConstant(BitWidth - ShAmt, ShiftAmtTy);
980 ConstantSDNode *ShAmt = dyn_cast<ConstantSDNode>(In.getOperand(1));
981 if (!ShAmt)
985 uint64_t ShVal = ShAmt->getZExtValue();
992 HighBits = HighBits.lshr(ShAmt->getZExtValue()).trunc(BitWidth);
994 if (ShAmt->getZExtValue() < BitWidth && !(HighBits & NewMask)) {
1045 SDValue ShAmt = TLO.DAG.getConstant(ShVal, Op.getValueType());
1048 Sign, ShAmt));
1242 const APInt &ShAmt
1245 ShAmt == Log2_32(N0.getValueType().getSizeInBits())) {
2624 unsigned ShAmt = d.countTrailingZeros();
2625 if (ShAmt) {
2627 SDValue Amt = DAG.getConstant(ShAmt, getShiftAmountTy(Op1.getValueType()));
2630 d = d.ashr(ShAmt);