47 const auto &OtherCR =
Other.getConstantRange();
48 if (CR.icmp(Pred, OtherCR))
81 if (
Other.isUnknown())
87 if (
Other.isOverdefined())
109 Other.isConstantRangeIncludingUndef());
114 return OS <<
"unknown";
116 return OS <<
"undef";
118 return OS <<
"overdefined";
124 return OS <<
"constantrange incl. undef <"
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
Predicate getInversePredicate() const
For example, EQ -> NE, UGT -> ULE, SLT -> SGE, OEQ -> UNE, UGT -> OLE, OLT -> UGE,...
static ConstantInt * getTrue(LLVMContext &Context)
static ConstantInt * getFalse(LLVMContext &Context)
This class represents a range of values.
const APInt & getLower() const
Return the lower value for this range.
bool isSingleElement() const
Return true if this set contains exactly one member.
const APInt & getUpper() const
Return the upper value for this range.
ConstantRange intersectWith(const ConstantRange &CR, PreferredRangeType Type=Smallest) const
Return the range that results from the intersection of this range with another range.
A parsed version of the target data layout string in and methods for querying it.
bool isEquality() const
Return true if this predicate is either EQ or NE.
The instances of the Type class are immutable: once they are created, they are never changed.
This class represents lattice values for constants.
static ValueLatticeElement getRange(ConstantRange CR, bool MayIncludeUndef=false)
bool isOverdefined() const
Constant * getCompare(CmpInst::Predicate Pred, Type *Ty, const ValueLatticeElement &Other, const DataLayout &DL) const
true, false or undef constants, or nullptr if the comparison cannot be evaluated.
bool isConstantRangeIncludingUndef() const
bool isNotConstant() const
const ConstantRange & getConstantRange(bool UndefAllowed=true) const
Returns the constant range for this value.
bool isConstantRange(bool UndefAllowed=true) const
Returns true if this value is a constant range.
Constant * getNotConstant() const
ValueLatticeElement intersect(const ValueLatticeElement &Other) const
Combine two sets of facts about the same value into a single set of facts.
Constant * getConstant() const
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
Constant * ConstantFoldCompareInstOperands(unsigned Predicate, Constant *LHS, Constant *RHS, const DataLayout &DL, const TargetLibraryInfo *TLI=nullptr, const Instruction *I=nullptr)
Attempt to constant fold a compare instruction (icmp/fcmp) with the specified operands.
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
static bool hasSingleValue(const ValueLatticeElement &Val)