Home | History | Annotate | Download | only in IR

Lines Matching refs:Upper

11 // for an integral value.  This keeps track of a lower and upper bound for the
13 // keeps track of a [lower, upper) bound, which specifies an interval just like
36 Lower = Upper = APInt::getMaxValue(BitWidth);
38 Lower = Upper = APInt::getMinValue(BitWidth);
44 : Lower(std::move(V)), Upper(Lower + 1) {}
47 : Lower(std::move(L)), Upper(std::move(U)) {
48 assert(Lower.getBitWidth() == Upper.getBitWidth() &&
50 assert((Lower != Upper || (Lower.isMaxValue() || Lower.isMinValue())) &&
51 "Lower == Upper, but they aren't min or max value!");
230 return Lower == Upper && Lower.isMaxValue();
236 return Lower == Upper && Lower.isMinValue();
243 return Lower.ugt(Upper);
264 return (Upper - Lower).zext(getBitWidth()+1);
320 if (Lower == Upper)
324 return Lower.ule(V) && V.ult(Upper);
325 return Lower.ule(V) || V.ult(Upper);
340 return Lower.ule(Other.getLower()) && Other.getUpper().ule(Upper);
344 return Other.getUpper().ule(Upper) ||
347 return Other.getUpper().ule(Upper) && Lower.ule(Other.getLower());
355 if (Lower == Upper)
357 return ConstantRange(Lower - Val, Upper - Val);
384 if (Upper.ule(CR.Lower))
387 if (Upper.ult(CR.Upper))
388 return ConstantRange(CR.Lower, Upper);
392 if (Upper.ult(CR.Upper))
395 if (Lower.ult(CR.Upper))
396 return ConstantRange(Lower, CR.Upper);
402 if (CR.Lower.ult(Upper)) {
403 if (CR.Upper.ult(Upper))
406 if (CR.Upper.ule(Lower))
407 return ConstantRange(CR.Lower, Upper);
414 if (CR.Upper.ule(Lower))
417 return ConstantRange(Lower, CR.Upper);
422 if (CR.Upper.ult(Upper)) {
423 if (CR.Lower.ult(Upper)) {
430 return ConstantRange(Lower, CR.Upper);
434 if (CR.Upper.ule(Lower)) {
438 return ConstantRange(CR.Lower, Upper);
462 if (CR.Upper.ult(Lower) || Upper.ult(CR.Lower)) {
464 APInt d1 = CR.Lower - Upper, d2 = Lower - CR.Upper;
466 return ConstantRange(Lower, CR.Upper);
467 return ConstantRange(CR.Lower, Upper);
470 APInt L = Lower, U = Upper;
473 if ((CR.Upper - 1).ugt(U - 1))
474 U = CR.Upper;
485 if (CR.Upper.ule(Upper) || CR.Lower.uge(Lower))
490 if (CR.Lower.ule(Upper) && Lower.ule(CR.Upper))
496 if (Upper.ule(CR.Lower) && CR.Upper.ule(Lower)) {
497 APInt d1 = CR.Lower - Upper, d2 = Lower - CR.Upper;
499 return ConstantRange(Lower, CR.Upper);
500 return ConstantRange(CR.Lower, Upper);
505 if (Upper.ult(CR.Lower) && Lower.ult(CR.Upper))
506 Upper);
510 assert(CR.Lower.ult(Upper) && CR.Upper.ult(Lower) &&
512 return ConstantRange(Lower, CR.Upper);
517 if (CR.Lower.ule(Upper) || Lower.ule(CR.Upper))
520 APInt L = Lower, U = Upper;
521 if (CR.Upper.ugt(U))
522 U = CR.Upper;
541 if (!Upper) // special case: [X, 0) -- not really wrapping around
546 return ConstantRange(Lower.zext(DstTySize), Upper.zext(DstTySize));
560 if (Upper.isMinSignedValue())
561 return ConstantRange(Lower.sext(DstTySize), Upper.zext(DstTySize));
568 return ConstantRange(Lower.sext(DstTySize), Upper.sext(DstTySize));
586 APInt LowerDiv(Lower), UpperDiv(Upper);
589 // Analyze wrapped sets in their two parts: [0, Upper) \/ [Lower, MaxValue]
591 // then we do the union with [MaxValue, Upper)
593 // If Upper is greater than Max Value, it covers the whole truncated range.
594 if (Upper.uge(MaxValue))
597 Union = ConstantRange(APInt::getMaxValue(DstTySize),Upper.trunc(DstTySize));
725 // lower and upper ranges; for example:
727 // Similarly for the upper bound, swapping min for max.
814 APInt Upper = getUnsignedMax().udiv(RHS_umin) + 1;
818 if (Lower == Upper)
821 return ConstantRange(Lower, Upper);
885 return ConstantRange(Upper, Lower);
896 OS << "[" << Lower << "," << Upper << ")";