Lines Matching refs:Upper

45       Upper(Lower) {}  in ConstantRange()
48 : Lower(std::move(V)), Upper(Lower + 1) {} in ConstantRange()
51 : Lower(std::move(L)), Upper(std::move(U)) { in ConstantRange()
52 assert(Lower.getBitWidth() == Upper.getBitWidth() && in ConstantRange()
54 assert((Lower != Upper || (Lower.isMaxValue() || Lower.isMinValue())) && in ConstantRange()
72 APInt Lower = Known.getMinValue(), Upper = Known.getMaxValue(); in fromKnownBits() local
74 Upper.clearSignBit(); in fromKnownBits()
75 return ConstantRange(Lower, Upper + 1); in fromKnownBits()
216 APInt Lower, Upper; in makeExactMulNSWRegion() local
219 Upper = APIntOps::RoundingSDiv(MinValue, V, APInt::Rounding::DOWN); in makeExactMulNSWRegion()
222 Upper = APIntOps::RoundingSDiv(MaxValue, V, APInt::Rounding::DOWN); in makeExactMulNSWRegion()
227 return ConstantRange(Lower, Upper + 1); in makeExactMulNSWRegion()
311 return Lower == Upper && Lower.isMaxValue(); in isFullSet()
315 return Lower == Upper && Lower.isMinValue(); in isEmptySet()
319 return Lower.ugt(Upper) && !Upper.isNullValue(); in isWrappedSet()
323 return Lower.ugt(Upper); in isUpperWrapped()
327 return Lower.sgt(Upper) && !Upper.isMinSignedValue(); in isSignWrappedSet()
331 return Lower.sgt(Upper); in isUpperSignWrapped()
341 return (Upper - Lower).ult(Other.Upper - Other.Lower); in isSizeStrictlySmallerThan()
352 return (Upper - Lower).ugt(MaxSize); in isSizeLargerThan()
362 return !isUpperSignWrapped() && !Upper.isStrictlyPositive(); in isAllNegative()
395 if (Lower == Upper) in contains()
399 return Lower.ule(V) && V.ult(Upper); in contains()
400 return Lower.ule(V) || V.ult(Upper); in contains()
411 return Lower.ule(Other.getLower()) && Other.getUpper().ule(Upper); in contains()
415 return Other.getUpper().ule(Upper) || in contains()
418 return Other.getUpper().ule(Upper) && Lower.ule(Other.getLower()); in contains()
439 if (Lower == Upper) in subtract()
441 return ConstantRange(Lower - Val, Upper - Val); in subtract()
484 if (Upper.ule(CR.Lower)) in intersectWith()
489 if (Upper.ult(CR.Upper)) in intersectWith()
490 return ConstantRange(CR.Lower, Upper); in intersectWith()
498 if (Upper.ult(CR.Upper)) in intersectWith()
503 if (Lower.ult(CR.Upper)) in intersectWith()
504 return ConstantRange(Lower, CR.Upper); in intersectWith()
512 if (CR.Lower.ult(Upper)) { in intersectWith()
515 if (CR.Upper.ult(Upper)) in intersectWith()
520 if (CR.Upper.ule(Lower)) in intersectWith()
521 return ConstantRange(CR.Lower, Upper); in intersectWith()
530 if (CR.Upper.ule(Lower)) in intersectWith()
535 return ConstantRange(Lower, CR.Upper); in intersectWith()
543 if (CR.Upper.ult(Upper)) { in intersectWith()
546 if (CR.Lower.ult(Upper)) in intersectWith()
552 return ConstantRange(Lower, CR.Upper); in intersectWith()
558 if (CR.Upper.ule(Lower)) { in intersectWith()
566 return ConstantRange(CR.Lower, Upper); in intersectWith()
591 if (CR.Upper.ult(Lower) || Upper.ult(CR.Lower)) in unionWith()
593 ConstantRange(Lower, CR.Upper), ConstantRange(CR.Lower, Upper), Type); in unionWith()
596 APInt U = (CR.Upper - 1).ugt(Upper - 1) ? CR.Upper : Upper; in unionWith()
607 if (CR.Upper.ule(Upper) || CR.Lower.uge(Lower)) in unionWith()
612 if (CR.Lower.ule(Upper) && Lower.ule(CR.Upper)) in unionWith()
620 if (Upper.ult(CR.Lower) && CR.Upper.ult(Lower)) in unionWith()
622 ConstantRange(Lower, CR.Upper), ConstantRange(CR.Lower, Upper), Type); in unionWith()
626 if (Upper.ult(CR.Lower) && Lower.ule(CR.Upper)) in unionWith()
627 return ConstantRange(CR.Lower, Upper); in unionWith()
631 assert(CR.Lower.ule(Upper) && CR.Upper.ult(Lower) && in unionWith()
633 return ConstantRange(Lower, CR.Upper); in unionWith()
638 if (CR.Lower.ule(Upper) || Lower.ule(CR.Upper)) in unionWith()
642 APInt U = CR.Upper.ugt(Upper) ? CR.Upper : Upper; in unionWith()
698 if (!Upper) // special case: [X, 0) -- not really wrapping around in zeroExtend()
704 return ConstantRange(Lower.zext(DstTySize), Upper.zext(DstTySize)); in zeroExtend()
714 if (Upper.isMinSignedValue()) in signExtend()
715 return ConstantRange(Lower.sext(DstTySize), Upper.zext(DstTySize)); in signExtend()
722 return ConstantRange(Lower.sext(DstTySize), Upper.sext(DstTySize)); in signExtend()
732 APInt LowerDiv(Lower), UpperDiv(Upper); in truncate()
741 if (Upper.getActiveBits() > DstTySize || in truncate()
742 Upper.countTrailingOnes() == DstTySize) in truncate()
745 Union = ConstantRange(APInt::getMaxValue(DstTySize),Upper.trunc(DstTySize)); in truncate()
1131 APInt Upper = getUnsignedMax().udiv(RHS_umin) + 1; in udiv() local
1132 return getNonEmpty(std::move(Lower), std::move(Upper)); in udiv()
1151 PosRes = ConstantRange(PosL.Lower.sdiv(PosR.Upper - 1), in sdiv()
1152 (PosL.Upper - 1).sdiv(PosR.Lower) + 1); in sdiv()
1161 APInt Lo = (NegL.Upper - 1).sdiv(NegR.Lower); in sdiv()
1162 if (NegL.Lower.isMinSignedValue() && NegR.Upper.isNullValue()) { in sdiv()
1169 AdjNegRUpper = RHS.Upper; in sdiv()
1172 AdjNegRUpper = NegR.Upper - 1; in sdiv()
1180 if (NegL.Upper != SignedMin + 1) { in sdiv()
1182 if (Upper == SignedMin + 1) in sdiv()
1191 AdjNegLLower.sdiv(NegR.Upper - 1) + 1)); in sdiv()
1195 ConstantRange(std::move(Lo), NegL.Lower.sdiv(NegR.Upper - 1) + 1)); in sdiv()
1202 NegRes = ConstantRange((PosL.Upper - 1).sdiv(NegR.Upper - 1), in sdiv()
1209 (NegL.Upper - 1).sdiv(PosR.Upper - 1) + 1)); in sdiv()
1229 APInt Upper = APIntOps::umin(getUnsignedMax(), RHS.getUnsignedMax() - 1) + 1; in urem() local
1230 return getNonEmpty(APInt::getNullValue(getBitWidth()), std::move(Upper)); in urem()
1256 APInt Upper = APIntOps::umin(MaxLHS, MaxAbsRHS - 1) + 1; in srem() local
1257 return ConstantRange(APInt::getNullValue(getBitWidth()), std::move(Upper)); in srem()
1271 APInt Upper = APIntOps::umin(MaxLHS, MaxAbsRHS - 1) + 1; in srem() local
1272 return ConstantRange(std::move(Lower), std::move(Upper)); in srem()
1509 return ConstantRange(Upper, Lower); in inverse()
1519 if (Upper.isStrictlyPositive() || !Lower.isStrictlyPositive()) in abs()
1522 Lo = APIntOps::umin(Lower, -Upper + 1); in abs()
1672 OS << "[" << Lower << "," << Upper << ")"; in print()