Lines Matching refs:Upper
46 Upper(Lower) {} in ConstantRange()
49 : Lower(std::move(V)), Upper(Lower + 1) {} in ConstantRange()
52 : Lower(std::move(L)), Upper(std::move(U)) { in ConstantRange()
53 assert(Lower.getBitWidth() == Upper.getBitWidth() && in ConstantRange()
55 assert((Lower != Upper || (Lower.isMaxValue() || Lower.isMinValue())) && in ConstantRange()
73 APInt Lower = Known.getMinValue(), Upper = Known.getMaxValue(); in fromKnownBits() local
75 Upper.clearSignBit(); in fromKnownBits()
76 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()
281 return ConstantRange::getNonEmpty(Lower, Upper + 1); in makeExactMulNSWRegion()
368 return Lower == Upper && Lower.isMaxValue(); in isFullSet()
372 return Lower == Upper && Lower.isMinValue(); in isEmptySet()
376 return Lower.ugt(Upper) && !Upper.isZero(); in isWrappedSet()
380 return Lower.ugt(Upper); in isUpperWrapped()
384 return Lower.sgt(Upper) && !Upper.isMinSignedValue(); in isSignWrappedSet()
388 return Lower.sgt(Upper); in isUpperSignWrapped()
398 return (Upper - Lower).ult(Other.Upper - Other.Lower); in isSizeStrictlySmallerThan()
408 return (Upper - Lower).ugt(MaxSize); in isSizeLargerThan()
418 return !isUpperSignWrapped() && !Upper.isStrictlyPositive(); in isAllNegative()
451 if (Lower == Upper) in contains()
455 return Lower.ule(V) && V.ult(Upper); in contains()
456 return Lower.ule(V) || V.ult(Upper); in contains()
467 return Lower.ule(Other.getLower()) && Other.getUpper().ule(Upper); in contains()
471 return Other.getUpper().ule(Upper) || in contains()
474 return Other.getUpper().ule(Upper) && Lower.ule(Other.getLower()); in contains()
495 if (Lower == Upper) in subtract()
497 return ConstantRange(Lower - Val, Upper - Val); in subtract()
540 if (Upper.ule(CR.Lower)) in intersectWith()
545 if (Upper.ult(CR.Upper)) in intersectWith()
546 return ConstantRange(CR.Lower, Upper); in intersectWith()
554 if (Upper.ult(CR.Upper)) in intersectWith()
559 if (Lower.ult(CR.Upper)) in intersectWith()
560 return ConstantRange(Lower, CR.Upper); in intersectWith()
568 if (CR.Lower.ult(Upper)) { in intersectWith()
571 if (CR.Upper.ult(Upper)) in intersectWith()
576 if (CR.Upper.ule(Lower)) in intersectWith()
577 return ConstantRange(CR.Lower, Upper); in intersectWith()
586 if (CR.Upper.ule(Lower)) in intersectWith()
591 return ConstantRange(Lower, CR.Upper); in intersectWith()
599 if (CR.Upper.ult(Upper)) { in intersectWith()
602 if (CR.Lower.ult(Upper)) in intersectWith()
608 return ConstantRange(Lower, CR.Upper); in intersectWith()
614 if (CR.Upper.ule(Lower)) { in intersectWith()
622 return ConstantRange(CR.Lower, Upper); in intersectWith()
647 if (CR.Upper.ult(Lower) || Upper.ult(CR.Lower)) in unionWith()
649 ConstantRange(Lower, CR.Upper), ConstantRange(CR.Lower, Upper), Type); in unionWith()
652 APInt U = (CR.Upper - 1).ugt(Upper - 1) ? CR.Upper : Upper; in unionWith()
663 if (CR.Upper.ule(Upper) || CR.Lower.uge(Lower)) in unionWith()
668 if (CR.Lower.ule(Upper) && Lower.ule(CR.Upper)) in unionWith()
676 if (Upper.ult(CR.Lower) && CR.Upper.ult(Lower)) in unionWith()
678 ConstantRange(Lower, CR.Upper), ConstantRange(CR.Lower, Upper), Type); in unionWith()
682 if (Upper.ult(CR.Lower) && Lower.ule(CR.Upper)) in unionWith()
683 return ConstantRange(CR.Lower, Upper); in unionWith()
687 assert(CR.Lower.ule(Upper) && CR.Upper.ult(Lower) && in unionWith()
689 return ConstantRange(Lower, CR.Upper); in unionWith()
694 if (CR.Lower.ule(Upper) || Lower.ule(CR.Upper)) in unionWith()
698 APInt U = CR.Upper.ugt(Upper) ? CR.Upper : Upper; in unionWith()
780 if (!Upper) // special case: [X, 0) -- not really wrapping around in zeroExtend()
786 return ConstantRange(Lower.zext(DstTySize), Upper.zext(DstTySize)); in zeroExtend()
796 if (Upper.isMinSignedValue()) in signExtend()
797 return ConstantRange(Lower.sext(DstTySize), Upper.zext(DstTySize)); in signExtend()
804 return ConstantRange(Lower.sext(DstTySize), Upper.sext(DstTySize)); in signExtend()
814 APInt LowerDiv(Lower), UpperDiv(Upper); in truncate()
823 if (Upper.getActiveBits() > DstTySize || Upper.countr_one() == DstTySize) in truncate()
826 Union = ConstantRange(APInt::getMaxValue(DstTySize),Upper.trunc(DstTySize)); in truncate()
1262 APInt Upper = getUnsignedMax().udiv(RHS_umin) + 1; in udiv() local
1263 return getNonEmpty(std::move(Lower), std::move(Upper)); in udiv()
1285 PosRes = ConstantRange(PosL.Lower.sdiv(PosR.Upper - 1), in sdiv()
1286 (PosL.Upper - 1).sdiv(PosR.Lower) + 1); in sdiv()
1295 APInt Lo = (NegL.Upper - 1).sdiv(NegR.Lower); in sdiv()
1296 if (NegL.Lower.isMinSignedValue() && NegR.Upper.isZero()) { in sdiv()
1303 AdjNegRUpper = RHS.Upper; in sdiv()
1306 AdjNegRUpper = NegR.Upper - 1; in sdiv()
1314 if (NegL.Upper != SignedMin + 1) { in sdiv()
1316 if (Upper == SignedMin + 1) in sdiv()
1325 AdjNegLLower.sdiv(NegR.Upper - 1) + 1)); in sdiv()
1329 ConstantRange(std::move(Lo), NegL.Lower.sdiv(NegR.Upper - 1) + 1)); in sdiv()
1336 NegRes = ConstantRange((PosL.Upper - 1).sdiv(NegR.Upper - 1), in sdiv()
1343 (NegL.Upper - 1).sdiv(PosR.Upper - 1) + 1)); in sdiv()
1372 APInt Upper = APIntOps::umin(getUnsignedMax(), RHS.getUnsignedMax() - 1) + 1; in urem() local
1373 return getNonEmpty(APInt::getZero(getBitWidth()), std::move(Upper)); in urem()
1408 APInt Upper = APIntOps::umin(MaxLHS, MaxAbsRHS - 1) + 1; in srem() local
1409 return ConstantRange(APInt::getZero(getBitWidth()), std::move(Upper)); in srem()
1423 APInt Upper = APIntOps::umin(MaxLHS, MaxAbsRHS - 1) + 1; in srem() local
1424 return ConstantRange(std::move(Lower), std::move(Upper)); in srem()
1666 return ConstantRange(Upper, Lower); in inverse()
1676 if (Upper.isStrictlyPositive() || !Lower.isStrictlyPositive()) in abs()
1679 Lo = APIntOps::umin(Lower, -Upper + 1); in abs()
1750 const APInt &Upper) { in getUnsignedCountTrailingZerosRange() argument
1751 assert(!ConstantRange(Lower, Upper).isWrappedSet() && in getUnsignedCountTrailingZerosRange()
1753 assert(Lower != Upper && "Unexpected empty set."); in getUnsignedCountTrailingZerosRange()
1755 if (Lower + 1 == Upper) in getUnsignedCountTrailingZerosRange()
1762 unsigned LCPLength = (Lower ^ (Upper - 1)).countl_zero(); in getUnsignedCountTrailingZerosRange()
1785 if (Upper == 1) { in cttz()
1792 return getUnsignedCountTrailingZerosRange(APInt(BitWidth, 1), Upper); in cttz()
1793 } else if (Upper == 1) { in cttz()
1799 getUnsignedCountTrailingZerosRange(APInt(BitWidth, 1), Upper); in cttz()
1807 return getUnsignedCountTrailingZerosRange(Lower, Upper); in cttz()
1813 ConstantRange CR2 = getUnsignedCountTrailingZerosRange(Zero, Upper); in cttz()
1818 const APInt &Upper) { in getUnsignedPopCountRange() argument
1819 assert(!ConstantRange(Lower, Upper).isWrappedSet() && in getUnsignedPopCountRange()
1821 assert(Lower != Upper && "Unexpected empty set."); in getUnsignedPopCountRange()
1823 if (Lower + 1 == Upper) in getUnsignedPopCountRange()
1826 APInt Max = Upper - 1; in getUnsignedPopCountRange()
1852 return getUnsignedPopCountRange(Lower, Upper); in ctpop()
1859 ConstantRange CR2 = getUnsignedPopCountRange(Zero, Upper); in ctpop()
1981 OS << "[" << Lower << "," << Upper << ")"; in print()