reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

include/llvm/IR/ConstantRange.h
  162   const APInt &getUpper() const { return Upper; }
  208     if (Upper == Lower + 1)
  216     if (Lower == Upper + 1)
  217       return &Upper;
  250     return Lower == CR.Lower && Upper == CR.Upper;
  250     return Lower == CR.Lower && Upper == CR.Upper;
lib/IR/ConstantRange.cpp
   51   assert(Lower.getBitWidth() == Upper.getBitWidth() &&
   53   assert((Lower != Upper || (Lower.isMaxValue() || Lower.isMinValue())) &&
  305   return Lower == Upper && Lower.isMaxValue();
  309   return Lower == Upper && Lower.isMinValue();
  313   return Lower.ugt(Upper) && !Upper.isNullValue();
  313   return Lower.ugt(Upper) && !Upper.isNullValue();
  317   return Lower.ugt(Upper);
  321   return Lower.sgt(Upper) && !Upper.isMinSignedValue();
  321   return Lower.sgt(Upper) && !Upper.isMinSignedValue();
  325   return Lower.sgt(Upper);
  335   return (Upper - Lower).ult(Other.Upper - Other.Lower);
  335   return (Upper - Lower).ult(Other.Upper - Other.Lower);
  346   return (Upper - Lower).ugt(MaxSize);
  356   return !isUpperSignWrapped() && !Upper.isStrictlyPositive();
  389   if (Lower == Upper)
  393     return Lower.ule(V) && V.ult(Upper);
  394   return Lower.ule(V) || V.ult(Upper);
  405     return Lower.ule(Other.getLower()) && Other.getUpper().ule(Upper);
  409     return Other.getUpper().ule(Upper) ||
  412   return Other.getUpper().ule(Upper) && Lower.ule(Other.getLower());
  418   if (Lower == Upper)
  420   return ConstantRange(Lower - Val, Upper - Val);
  463       if (Upper.ule(CR.Lower))
  468       if (Upper.ult(CR.Upper))
  468       if (Upper.ult(CR.Upper))
  469         return ConstantRange(CR.Lower, Upper);
  477     if (Upper.ult(CR.Upper))
  477     if (Upper.ult(CR.Upper))
  482     if (Lower.ult(CR.Upper))
  483       return ConstantRange(Lower, CR.Upper);
  491     if (CR.Lower.ult(Upper)) {
  494       if (CR.Upper.ult(Upper))
  494       if (CR.Upper.ult(Upper))
  499       if (CR.Upper.ule(Lower))
  500         return ConstantRange(CR.Lower, Upper);
  509       if (CR.Upper.ule(Lower))
  514       return ConstantRange(Lower, CR.Upper);
  522   if (CR.Upper.ult(Upper)) {
  522   if (CR.Upper.ult(Upper)) {
  525     if (CR.Lower.ult(Upper))
  531       return ConstantRange(Lower, CR.Upper);
  537   if (CR.Upper.ule(Lower)) {
  545     return ConstantRange(CR.Lower, Upper);
  570     if (CR.Upper.ult(Lower) || Upper.ult(CR.Lower))
  570     if (CR.Upper.ult(Lower) || Upper.ult(CR.Lower))
  572           ConstantRange(Lower, CR.Upper), ConstantRange(CR.Lower, Upper), Type);
  572           ConstantRange(Lower, CR.Upper), ConstantRange(CR.Lower, Upper), Type);
  575     APInt U = (CR.Upper - 1).ugt(Upper - 1) ? CR.Upper : Upper;
  575     APInt U = (CR.Upper - 1).ugt(Upper - 1) ? CR.Upper : Upper;
  575     APInt U = (CR.Upper - 1).ugt(Upper - 1) ? CR.Upper : Upper;
  575     APInt U = (CR.Upper - 1).ugt(Upper - 1) ? CR.Upper : Upper;
  586     if (CR.Upper.ule(Upper) || CR.Lower.uge(Lower))
  586     if (CR.Upper.ule(Upper) || CR.Lower.uge(Lower))
  591     if (CR.Lower.ule(Upper) && Lower.ule(CR.Upper))
  591     if (CR.Lower.ule(Upper) && Lower.ule(CR.Upper))
  599     if (Upper.ult(CR.Lower) && CR.Upper.ult(Lower))
  599     if (Upper.ult(CR.Lower) && CR.Upper.ult(Lower))
  601           ConstantRange(Lower, CR.Upper), ConstantRange(CR.Lower, Upper), Type);
  601           ConstantRange(Lower, CR.Upper), ConstantRange(CR.Lower, Upper), Type);
  605     if (Upper.ult(CR.Lower) && Lower.ule(CR.Upper))
  605     if (Upper.ult(CR.Lower) && Lower.ule(CR.Upper))
  606       return ConstantRange(CR.Lower, Upper);
  610     assert(CR.Lower.ule(Upper) && CR.Upper.ult(Lower) &&
  610     assert(CR.Lower.ule(Upper) && CR.Upper.ult(Lower) &&
  612     return ConstantRange(Lower, CR.Upper);
  617   if (CR.Lower.ule(Upper) || Lower.ule(CR.Upper))
  617   if (CR.Lower.ule(Upper) || Lower.ule(CR.Upper))
  621   APInt U = CR.Upper.ugt(Upper) ? CR.Upper : Upper;
  621   APInt U = CR.Upper.ugt(Upper) ? CR.Upper : Upper;
  621   APInt U = CR.Upper.ugt(Upper) ? CR.Upper : Upper;
  621   APInt U = CR.Upper.ugt(Upper) ? CR.Upper : Upper;
  677     if (!Upper) // special case: [X, 0) -- not really wrapping around
  683   return ConstantRange(Lower.zext(DstTySize), Upper.zext(DstTySize));
  693   if (Upper.isMinSignedValue())
  694     return ConstantRange(Lower.sext(DstTySize), Upper.zext(DstTySize));
  701   return ConstantRange(Lower.sext(DstTySize), Upper.sext(DstTySize));
  711   APInt LowerDiv(Lower), UpperDiv(Upper);
  720     if (Upper.getActiveBits() > DstTySize ||
  721         Upper.countTrailingOnes() == DstTySize)
  724     Union = ConstantRange(APInt::getMaxValue(DstTySize),Upper.trunc(DstTySize));
 1060     PosRes = ConstantRange(PosL.Lower.sdiv(PosR.Upper - 1),
 1061                            (PosL.Upper - 1).sdiv(PosR.Lower) + 1);
 1070     APInt Lo = (NegL.Upper - 1).sdiv(NegR.Lower);
 1071     if (NegL.Lower.isMinSignedValue() && NegR.Upper.isNullValue()) {
 1078           AdjNegRUpper = RHS.Upper;
 1081           AdjNegRUpper = NegR.Upper - 1;
 1089       if (NegL.Upper != SignedMin + 1) {
 1091         if (Upper == SignedMin + 1)
 1100                           AdjNegLLower.sdiv(NegR.Upper - 1) + 1));
 1104           ConstantRange(std::move(Lo), NegL.Lower.sdiv(NegR.Upper - 1) + 1));
 1111     NegRes = ConstantRange((PosL.Upper - 1).sdiv(NegR.Upper - 1),
 1111     NegRes = ConstantRange((PosL.Upper - 1).sdiv(NegR.Upper - 1),
 1118                       (NegL.Upper - 1).sdiv(PosR.Upper - 1) + 1));
 1118                       (NegL.Upper - 1).sdiv(PosR.Upper - 1) + 1));
 1333   return ConstantRange(Upper, Lower);
 1343     if (Upper.isStrictlyPositive() || !Lower.isStrictlyPositive())
 1346       Lo = APIntOps::umin(Lower, -Upper + 1);
 1485     OS << "[" << Lower << "," << Upper << ")";