Lines Matching refs:APInt

36     Lower = Upper = APInt::getMaxValue(BitWidth);  in ConstantRange()
38 Lower = Upper = APInt::getMinValue(BitWidth); in ConstantRange()
70 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion()
73 return ConstantRange(APInt::getMinValue(W), UMax); in makeAllowedICmpRegion()
76 APInt SMax(CR.getSignedMax()); in makeAllowedICmpRegion()
79 return ConstantRange(APInt::getSignedMinValue(W), SMax); in makeAllowedICmpRegion()
82 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion()
85 return ConstantRange(APInt::getMinValue(W), UMax + 1); in makeAllowedICmpRegion()
88 APInt SMax(CR.getSignedMax()); in makeAllowedICmpRegion()
91 return ConstantRange(APInt::getSignedMinValue(W), SMax + 1); in makeAllowedICmpRegion()
94 APInt UMin(CR.getUnsignedMin()); in makeAllowedICmpRegion()
97 return ConstantRange(UMin + 1, APInt::getNullValue(W)); in makeAllowedICmpRegion()
100 APInt SMin(CR.getSignedMin()); in makeAllowedICmpRegion()
103 return ConstantRange(SMin + 1, APInt::getSignedMinValue(W)); in makeAllowedICmpRegion()
106 APInt UMin(CR.getUnsignedMin()); in makeAllowedICmpRegion()
109 return ConstantRange(UMin, APInt::getNullValue(W)); in makeAllowedICmpRegion()
112 APInt SMin(CR.getSignedMin()); in makeAllowedICmpRegion()
115 return ConstantRange(SMin, APInt::getSignedMinValue(W)); in makeAllowedICmpRegion()
131 const APInt &C) { in makeExactICmpRegion()
143 APInt &RHS) const { in getEquivalentICmp()
148 RHS = APInt(getBitWidth(), 0); in getEquivalentICmp()
205 SubsetIntersect(Result, ConstantRange(APInt::getNullValue(BitWidth), in makeGuaranteedNoWrapRegion()
209 APInt SignedMin = Other.getSignedMin(); in makeGuaranteedNoWrapRegion()
210 APInt SignedMax = Other.getSignedMax(); in makeGuaranteedNoWrapRegion()
215 ConstantRange(APInt::getSignedMinValue(BitWidth), in makeGuaranteedNoWrapRegion()
216 APInt::getSignedMinValue(BitWidth) - SignedMax)); in makeGuaranteedNoWrapRegion()
220 Result, ConstantRange(APInt::getSignedMinValue(BitWidth) - SignedMin, in makeGuaranteedNoWrapRegion()
221 APInt::getSignedMinValue(BitWidth))); in makeGuaranteedNoWrapRegion()
250 return contains(APInt::getSignedMaxValue(getBitWidth())) && in isSignWrappedSet()
251 contains(APInt::getSignedMinValue(getBitWidth())); in isSignWrappedSet()
256 APInt ConstantRange::getSetSize() const { in getSetSize()
258 APInt Size(getBitWidth()+1, 0); in getSetSize()
270 APInt ConstantRange::getUnsignedMax() const { in getUnsignedMax()
272 return APInt::getMaxValue(getBitWidth()); in getUnsignedMax()
279 APInt ConstantRange::getUnsignedMin() const { in getUnsignedMin()
281 return APInt::getMinValue(getBitWidth()); in getUnsignedMin()
288 APInt ConstantRange::getSignedMax() const { in getSignedMax()
289 APInt SignedMax(APInt::getSignedMaxValue(getBitWidth())); in getSignedMax()
303 APInt ConstantRange::getSignedMin() const { in getSignedMin()
304 APInt SignedMin(APInt::getSignedMinValue(getBitWidth())); in getSignedMin()
319 bool ConstantRange::contains(const APInt &V) const { in contains()
352 ConstantRange ConstantRange::subtract(const APInt &Val) const { in subtract()
464 APInt d1 = CR.Lower - Upper, d2 = Lower - CR.Upper; in unionWith()
470 APInt L = Lower, U = Upper; in unionWith()
497 APInt d1 = CR.Lower - Upper, d2 = Lower - CR.Upper; in unionWith()
520 APInt L = Lower, U = Upper; in unionWith()
540 APInt LowerExt(DstTySize, 0); in zeroExtend()
543 return ConstantRange(LowerExt, APInt::getOneBitSet(DstTySize, SrcTySize)); in zeroExtend()
564 return ConstantRange(APInt::getHighBitsSet(DstTySize,DstTySize-SrcTySize+1), in signExtend()
565 APInt::getLowBitsSet(DstTySize, SrcTySize-1) + 1); in signExtend()
582 APInt MaxValue = APInt::getMaxValue(DstTySize).zext(getBitWidth()); in truncate()
583 APInt MaxBitValue(getBitWidth(), 0); in truncate()
586 APInt LowerDiv(Lower), UpperDiv(Upper); in truncate()
597 Union = ConstantRange(APInt::getMaxValue(DstTySize),Upper.trunc(DstTySize)); in truncate()
598 UpperDiv = APInt::getMaxValue(getBitWidth()); in truncate()
608 APInt Div(getBitWidth(), 0); in truncate()
609 APInt::udivrem(LowerDiv, MaxBitValue, Div, LowerDiv); in truncate()
618 APInt UpperModulo = UpperDiv - MaxBitValue; in truncate()
655 APInt Spread_X = getSetSize(), Spread_Y = Other.getSetSize(); in add()
656 APInt NewLower = getLower() + Other.getLower(); in add()
657 APInt NewUpper = getUpper() + Other.getUpper() - 1; in add()
676 APInt Spread_X = getSetSize(), Spread_Y = Other.getSetSize(); in sub()
677 APInt NewLower = getLower() - Other.getUpper() + 1; in sub()
678 APInt NewUpper = getUpper() - Other.getLower(); in sub()
707 APInt this_min = getUnsignedMin().zext(getBitWidth() * 2); in multiply()
708 APInt this_max = getUnsignedMax().zext(getBitWidth() * 2); in multiply()
709 APInt Other_min = Other.getUnsignedMin().zext(getBitWidth() * 2); in multiply()
710 APInt Other_max = Other.getUnsignedMax().zext(getBitWidth() * 2); in multiply()
736 auto Compare = [](const APInt &A, const APInt &B) { return A.slt(B); }; in multiply()
749 APInt NewL = APIntOps::smax(getSignedMin(), Other.getSignedMin()); in smax()
750 APInt NewU = APIntOps::smax(getSignedMax(), Other.getSignedMax()) + 1; in smax()
762 APInt NewL = APIntOps::umax(getUnsignedMin(), Other.getUnsignedMin()); in umax()
763 APInt NewU = APIntOps::umax(getUnsignedMax(), Other.getUnsignedMax()) + 1; in umax()
775 APInt NewL = APIntOps::smin(getSignedMin(), Other.getSignedMin()); in smin()
776 APInt NewU = APIntOps::smin(getSignedMax(), Other.getSignedMax()) + 1; in smin()
788 APInt NewL = APIntOps::umin(getUnsignedMin(), Other.getUnsignedMin()); in umin()
789 APInt NewU = APIntOps::umin(getUnsignedMax(), Other.getUnsignedMax()) + 1; in umin()
802 APInt Lower = getUnsignedMin().udiv(RHS.getUnsignedMax()); in udiv()
804 APInt RHS_umin = RHS.getUnsignedMin(); in udiv()
811 RHS_umin = APInt(getBitWidth(), 1); in udiv()
814 APInt Upper = getUnsignedMax().udiv(RHS_umin) + 1; in udiv()
831 APInt umin = APIntOps::umin(Other.getUnsignedMax(), getUnsignedMax()); in binaryAnd()
834 return ConstantRange(APInt::getNullValue(getBitWidth()), umin + 1); in binaryAnd()
844 APInt umax = APIntOps::umax(getUnsignedMin(), Other.getUnsignedMin()); in binaryOr()
847 return ConstantRange(umax, APInt::getNullValue(getBitWidth())); in binaryOr()
855 APInt min = getUnsignedMin().shl(Other.getUnsignedMin()); in shl()
856 APInt max = getUnsignedMax().shl(Other.getUnsignedMax()); in shl()
859 APInt Zeros(getBitWidth(), getUnsignedMax().countLeadingZeros()); in shl()
872 APInt max = getUnsignedMax().lshr(Other.getUnsignedMin()); in lshr()
873 APInt min = getUnsignedMin().lshr(Other.getUnsignedMax()); in lshr()