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()
302 APInt Lower, Upper; in makeExactMulNSWRegion() local
305 Upper = APIntOps::RoundingSDiv(MinValue, V, APInt::Rounding::DOWN); in makeExactMulNSWRegion()
308 Upper = APIntOps::RoundingSDiv(MaxValue, V, APInt::Rounding::DOWN); in makeExactMulNSWRegion()
310 return ConstantRange::getNonEmpty(Lower, Upper + 1); in makeExactMulNSWRegion()
414 return Lower == Upper && Lower.isMaxValue(); in isFullSet()
418 return Lower == Upper && Lower.isMinValue(); in isEmptySet()
422 return Lower.ugt(Upper) && !Upper.isZero(); in isWrappedSet()
426 return Lower.ugt(Upper); in isUpperWrapped()
430 return Lower.sgt(Upper) && !Upper.isMinSignedValue(); in isSignWrappedSet()
434 return Lower.sgt(Upper); in isUpperSignWrapped()
444 return (Upper - Lower).ult(Other.Upper - Other.Lower); in isSizeStrictlySmallerThan()
454 return (Upper - Lower).ugt(MaxSize); in isSizeLargerThan()
464 return !isUpperSignWrapped() && !Upper.isStrictlyPositive(); in isAllNegative()
507 if (Lower == Upper) in contains()
511 return Lower.ule(V) && V.ult(Upper); in contains()
512 return Lower.ule(V) || V.ult(Upper); in contains()
523 return Lower.ule(Other.getLower()) && Other.getUpper().ule(Upper); in contains()
527 return Other.getUpper().ule(Upper) || in contains()
530 return Other.getUpper().ule(Upper) && Lower.ule(Other.getLower()); in contains()
551 if (Lower == Upper) in subtract()
553 return ConstantRange(Lower - Val, Upper - Val); in subtract()
596 if (Upper.ule(CR.Lower)) in intersectWith()
601 if (Upper.ult(CR.Upper)) in intersectWith()
602 return ConstantRange(CR.Lower, Upper); in intersectWith()
610 if (Upper.ult(CR.Upper)) in intersectWith()
615 if (Lower.ult(CR.Upper)) in intersectWith()
616 return ConstantRange(Lower, CR.Upper); in intersectWith()
624 if (CR.Lower.ult(Upper)) { in intersectWith()
627 if (CR.Upper.ult(Upper)) in intersectWith()
632 if (CR.Upper.ule(Lower)) in intersectWith()
633 return ConstantRange(CR.Lower, Upper); in intersectWith()
642 if (CR.Upper.ule(Lower)) in intersectWith()
647 return ConstantRange(Lower, CR.Upper); in intersectWith()
655 if (CR.Upper.ult(Upper)) { in intersectWith()
658 if (CR.Lower.ult(Upper)) in intersectWith()
664 return ConstantRange(Lower, CR.Upper); in intersectWith()
670 if (CR.Upper.ule(Lower)) { in intersectWith()
678 return ConstantRange(CR.Lower, Upper); in intersectWith()
703 if (CR.Upper.ult(Lower) || Upper.ult(CR.Lower)) in unionWith()
705 ConstantRange(Lower, CR.Upper), ConstantRange(CR.Lower, Upper), Type); in unionWith()
708 APInt U = (CR.Upper - 1).ugt(Upper - 1) ? CR.Upper : Upper; in unionWith()
719 if (CR.Upper.ule(Upper) || CR.Lower.uge(Lower)) in unionWith()
724 if (CR.Lower.ule(Upper) && Lower.ule(CR.Upper)) in unionWith()
732 if (Upper.ult(CR.Lower) && CR.Upper.ult(Lower)) in unionWith()
734 ConstantRange(Lower, CR.Upper), ConstantRange(CR.Lower, Upper), Type); in unionWith()
738 if (Upper.ult(CR.Lower) && Lower.ule(CR.Upper)) in unionWith()
739 return ConstantRange(CR.Lower, Upper); in unionWith()
743 assert(CR.Lower.ule(Upper) && CR.Upper.ult(Lower) && in unionWith()
745 return ConstantRange(Lower, CR.Upper); in unionWith()
750 if (CR.Lower.ule(Upper) || Lower.ule(CR.Upper)) in unionWith()
754 APInt U = CR.Upper.ugt(Upper) ? CR.Upper : Upper; in unionWith()
836 if (!Upper) // special case: [X, 0) -- not really wrapping around in zeroExtend()
842 return ConstantRange(Lower.zext(DstTySize), Upper.zext(DstTySize)); in zeroExtend()
852 if (Upper.isMinSignedValue()) in signExtend()
853 return ConstantRange(Lower.sext(DstTySize), Upper.zext(DstTySize)); in signExtend()
860 return ConstantRange(Lower.sext(DstTySize), Upper.sext(DstTySize)); in signExtend()
870 APInt LowerDiv(Lower), UpperDiv(Upper); in truncate()
879 if (Upper.getActiveBits() > DstTySize || Upper.countr_one() == DstTySize) in truncate()
882 Union = ConstantRange(APInt::getMaxValue(DstTySize),Upper.trunc(DstTySize)); in truncate()
1340 APInt Upper = getUnsignedMax().udiv(RHS_umin) + 1; in udiv() local
1341 return getNonEmpty(std::move(Lower), std::move(Upper)); in udiv()
1363 PosRes = ConstantRange(PosL.Lower.sdiv(PosR.Upper - 1), in sdiv()
1364 (PosL.Upper - 1).sdiv(PosR.Lower) + 1); in sdiv()
1373 APInt Lo = (NegL.Upper - 1).sdiv(NegR.Lower); in sdiv()
1374 if (NegL.Lower.isMinSignedValue() && NegR.Upper.isZero()) { in sdiv()
1381 AdjNegRUpper = RHS.Upper; in sdiv()
1384 AdjNegRUpper = NegR.Upper - 1; in sdiv()
1392 if (NegL.Upper != SignedMin + 1) { in sdiv()
1394 if (Upper == SignedMin + 1) in sdiv()
1403 AdjNegLLower.sdiv(NegR.Upper - 1) + 1)); in sdiv()
1407 ConstantRange(std::move(Lo), NegL.Lower.sdiv(NegR.Upper - 1) + 1)); in sdiv()
1414 NegRes = ConstantRange((PosL.Upper - 1).sdiv(NegR.Upper - 1), in sdiv()
1421 (NegL.Upper - 1).sdiv(PosR.Upper - 1) + 1)); in sdiv()
1450 APInt Upper = APIntOps::umin(getUnsignedMax(), RHS.getUnsignedMax() - 1) + 1; in urem() local
1451 return getNonEmpty(APInt::getZero(getBitWidth()), std::move(Upper)); in urem()
1486 APInt Upper = APIntOps::umin(MaxLHS, MaxAbsRHS - 1) + 1; in srem() local
1487 return ConstantRange(APInt::getZero(getBitWidth()), std::move(Upper)); in srem()
1501 APInt Upper = APIntOps::umin(MaxLHS, MaxAbsRHS - 1) + 1; in srem() local
1502 return ConstantRange(std::move(Lower), std::move(Upper)); in srem()
1759 return ConstantRange(Upper, Lower); in inverse()
1769 if (Upper.isStrictlyPositive() || !Lower.isStrictlyPositive()) in abs()
1772 Lo = APIntOps::umin(Lower, -Upper + 1); in abs()
1843 const APInt &Upper) { in getUnsignedCountTrailingZerosRange() argument
1844 assert(!ConstantRange(Lower, Upper).isWrappedSet() && in getUnsignedCountTrailingZerosRange()
1846 assert(Lower != Upper && "Unexpected empty set."); in getUnsignedCountTrailingZerosRange()
1848 if (Lower + 1 == Upper) in getUnsignedCountTrailingZerosRange()
1855 unsigned LCPLength = (Lower ^ (Upper - 1)).countl_zero(); in getUnsignedCountTrailingZerosRange()
1878 if (Upper == 1) { in cttz()
1885 return getUnsignedCountTrailingZerosRange(APInt(BitWidth, 1), Upper); in cttz()
1886 } else if (Upper == 1) { in cttz()
1892 getUnsignedCountTrailingZerosRange(APInt(BitWidth, 1), Upper); in cttz()
1900 return getUnsignedCountTrailingZerosRange(Lower, Upper); in cttz()
1906 ConstantRange CR2 = getUnsignedCountTrailingZerosRange(Zero, Upper); in cttz()
1911 const APInt &Upper) { in getUnsignedPopCountRange() argument
1912 assert(!ConstantRange(Lower, Upper).isWrappedSet() && in getUnsignedPopCountRange()
1914 assert(Lower != Upper && "Unexpected empty set."); in getUnsignedPopCountRange()
1916 if (Lower + 1 == Upper) in getUnsignedPopCountRange()
1919 APInt Max = Upper - 1; in getUnsignedPopCountRange()
1945 return getUnsignedPopCountRange(Lower, Upper); in ctpop()
1952 ConstantRange CR2 = getUnsignedPopCountRange(Zero, Upper); in ctpop()
2074 OS << "[" << Lower << "," << Upper << ")"; in print()