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()
273 APInt Lower, Upper; in makeExactMulNSWRegion() local
276 Upper = APIntOps::RoundingSDiv(MinValue, V, APInt::Rounding::DOWN); in makeExactMulNSWRegion()
279 Upper = APIntOps::RoundingSDiv(MaxValue, V, APInt::Rounding::DOWN); in makeExactMulNSWRegion()
284 return ConstantRange(Lower, Upper + 1); in makeExactMulNSWRegion()
367 return Lower == Upper && Lower.isMaxValue(); in isFullSet()
371 return Lower == Upper && Lower.isMinValue(); in isEmptySet()
375 return Lower.ugt(Upper) && !Upper.isZero(); in isWrappedSet()
379 return Lower.ugt(Upper); in isUpperWrapped()
383 return Lower.sgt(Upper) && !Upper.isMinSignedValue(); in isSignWrappedSet()
387 return Lower.sgt(Upper); in isUpperSignWrapped()
397 return (Upper - Lower).ult(Other.Upper - Other.Lower); in isSizeStrictlySmallerThan()
407 return (Upper - Lower).ugt(MaxSize); in isSizeLargerThan()
417 return !isUpperSignWrapped() && !Upper.isStrictlyPositive(); in isAllNegative()
450 if (Lower == Upper) in contains()
454 return Lower.ule(V) && V.ult(Upper); in contains()
455 return Lower.ule(V) || V.ult(Upper); in contains()
466 return Lower.ule(Other.getLower()) && Other.getUpper().ule(Upper); in contains()
470 return Other.getUpper().ule(Upper) || in contains()
473 return Other.getUpper().ule(Upper) && Lower.ule(Other.getLower()); in contains()
494 if (Lower == Upper) in subtract()
496 return ConstantRange(Lower - Val, Upper - Val); in subtract()
539 if (Upper.ule(CR.Lower)) in intersectWith()
544 if (Upper.ult(CR.Upper)) in intersectWith()
545 return ConstantRange(CR.Lower, Upper); in intersectWith()
553 if (Upper.ult(CR.Upper)) in intersectWith()
558 if (Lower.ult(CR.Upper)) in intersectWith()
559 return ConstantRange(Lower, CR.Upper); in intersectWith()
567 if (CR.Lower.ult(Upper)) { in intersectWith()
570 if (CR.Upper.ult(Upper)) in intersectWith()
575 if (CR.Upper.ule(Lower)) in intersectWith()
576 return ConstantRange(CR.Lower, Upper); in intersectWith()
585 if (CR.Upper.ule(Lower)) in intersectWith()
590 return ConstantRange(Lower, CR.Upper); in intersectWith()
598 if (CR.Upper.ult(Upper)) { in intersectWith()
601 if (CR.Lower.ult(Upper)) in intersectWith()
607 return ConstantRange(Lower, CR.Upper); in intersectWith()
613 if (CR.Upper.ule(Lower)) { in intersectWith()
621 return ConstantRange(CR.Lower, Upper); in intersectWith()
646 if (CR.Upper.ult(Lower) || Upper.ult(CR.Lower)) in unionWith()
648 ConstantRange(Lower, CR.Upper), ConstantRange(CR.Lower, Upper), Type); in unionWith()
651 APInt U = (CR.Upper - 1).ugt(Upper - 1) ? CR.Upper : Upper; in unionWith()
662 if (CR.Upper.ule(Upper) || CR.Lower.uge(Lower)) in unionWith()
667 if (CR.Lower.ule(Upper) && Lower.ule(CR.Upper)) in unionWith()
675 if (Upper.ult(CR.Lower) && CR.Upper.ult(Lower)) in unionWith()
677 ConstantRange(Lower, CR.Upper), ConstantRange(CR.Lower, Upper), Type); in unionWith()
681 if (Upper.ult(CR.Lower) && Lower.ule(CR.Upper)) in unionWith()
682 return ConstantRange(CR.Lower, Upper); in unionWith()
686 assert(CR.Lower.ule(Upper) && CR.Upper.ult(Lower) && in unionWith()
688 return ConstantRange(Lower, CR.Upper); in unionWith()
693 if (CR.Lower.ule(Upper) || Lower.ule(CR.Upper)) in unionWith()
697 APInt U = CR.Upper.ugt(Upper) ? CR.Upper : Upper; in unionWith()
779 if (!Upper) // special case: [X, 0) -- not really wrapping around in zeroExtend()
785 return ConstantRange(Lower.zext(DstTySize), Upper.zext(DstTySize)); in zeroExtend()
795 if (Upper.isMinSignedValue()) in signExtend()
796 return ConstantRange(Lower.sext(DstTySize), Upper.zext(DstTySize)); in signExtend()
803 return ConstantRange(Lower.sext(DstTySize), Upper.sext(DstTySize)); in signExtend()
813 APInt LowerDiv(Lower), UpperDiv(Upper); in truncate()
822 if (Upper.getActiveBits() > DstTySize || in truncate()
823 Upper.countTrailingOnes() == DstTySize) in truncate()
826 Union = ConstantRange(APInt::getMaxValue(DstTySize),Upper.trunc(DstTySize)); in truncate()
1231 APInt Upper = getUnsignedMax().udiv(RHS_umin) + 1; in udiv() local
1232 return getNonEmpty(std::move(Lower), std::move(Upper)); in udiv()
1254 PosRes = ConstantRange(PosL.Lower.sdiv(PosR.Upper - 1), in sdiv()
1255 (PosL.Upper - 1).sdiv(PosR.Lower) + 1); in sdiv()
1264 APInt Lo = (NegL.Upper - 1).sdiv(NegR.Lower); in sdiv()
1265 if (NegL.Lower.isMinSignedValue() && NegR.Upper.isZero()) { in sdiv()
1272 AdjNegRUpper = RHS.Upper; in sdiv()
1275 AdjNegRUpper = NegR.Upper - 1; in sdiv()
1283 if (NegL.Upper != SignedMin + 1) { in sdiv()
1285 if (Upper == SignedMin + 1) in sdiv()
1294 AdjNegLLower.sdiv(NegR.Upper - 1) + 1)); in sdiv()
1298 ConstantRange(std::move(Lo), NegL.Lower.sdiv(NegR.Upper - 1) + 1)); in sdiv()
1305 NegRes = ConstantRange((PosL.Upper - 1).sdiv(NegR.Upper - 1), in sdiv()
1312 (NegL.Upper - 1).sdiv(PosR.Upper - 1) + 1)); in sdiv()
1341 APInt Upper = APIntOps::umin(getUnsignedMax(), RHS.getUnsignedMax() - 1) + 1; in urem() local
1342 return getNonEmpty(APInt::getZero(getBitWidth()), std::move(Upper)); in urem()
1377 APInt Upper = APIntOps::umin(MaxLHS, MaxAbsRHS - 1) + 1; in srem() local
1378 return ConstantRange(APInt::getZero(getBitWidth()), std::move(Upper)); in srem()
1392 APInt Upper = APIntOps::umin(MaxLHS, MaxAbsRHS - 1) + 1; in srem() local
1393 return ConstantRange(std::move(Lower), std::move(Upper)); in srem()
1628 return ConstantRange(Upper, Lower); in inverse()
1638 if (Upper.isStrictlyPositive() || !Lower.isStrictlyPositive()) in abs()
1641 Lo = APIntOps::umin(Lower, -Upper + 1); in abs()
1791 OS << "[" << Lower << "," << Upper << ")"; in print()