23 bool CarryZero,
bool CarryOne) {
24 assert(!(CarryZero && CarryOne) &&
25 "Carry can't be zero and one at the same time");
27 APInt PossibleSumZero =
LHS.getMaxValue() +
RHS.getMaxValue() + !CarryZero;
28 APInt PossibleSumOne =
LHS.getMinValue() +
RHS.getMinValue() + CarryOne;
31 APInt CarryKnownZero = ~(PossibleSumZero ^
LHS.Zero ^
RHS.Zero);
32 APInt CarryKnownOne = PossibleSumOne ^
LHS.One ^
RHS.One;
37 APInt CarryKnownUnion = std::move(CarryKnownZero) | CarryKnownOne;
38 APInt Known = std::move(LHSKnownUnion) & RHSKnownUnion & CarryKnownUnion;
40 assert((PossibleSumZero & Known) == (PossibleSumOne & Known) &&
41 "known bits of sum differ");
46 KnownOut.
One = std::move(PossibleSumOne) & Known;
53 return ::computeForAddCarry(
64 if (
LHS.isUnknown() &&
RHS.isUnknown())
67 if (!
LHS.isUnknown() && !
RHS.isUnknown()) {
85 APInt MinVal =
LHS.getMinValue().uadd_sat(
RHS.getMinValue());
97 APInt MaxVal =
LHS.getMaxValue().usub_sat(
RHS.getMinValue());
115 MinVal =
LHS.getSignedMinValue().sadd_sat(
RHS.getSignedMinValue());
116 MaxVal =
LHS.getSignedMaxValue().sadd_sat(
RHS.getSignedMaxValue());
119 MinVal =
LHS.getSignedMinValue().ssub_sat(
RHS.getSignedMaxValue());
120 MaxVal =
LHS.getSignedMaxValue().ssub_sat(
RHS.getSignedMinValue());
150 return ::computeForAddCarry(
LHS,
RHS,
158 "Illegal sext-in-register");
163 unsigned ExtBits =
BitWidth - SrcBitWidth;
165 Result.One =
One << ExtBits;
166 Result.Zero =
Zero << ExtBits;
167 Result.One.ashrInPlace(ExtBits);
168 Result.Zero.ashrInPlace(ExtBits);
179 APInt MaskedVal(Val);
189 if (
LHS.getMinValue().uge(
RHS.getMaxValue()))
191 if (
RHS.getMinValue().uge(
LHS.getMaxValue()))
199 return L.intersectWith(R);
215 One.
setBitVal(SignBitPosition, Val.Zero[SignBitPosition]);
228 One.
setBitVal(SignBitPosition, Val.One[SignBitPosition]);
237 if (
LHS.getMinValue().uge(
RHS.getMaxValue()))
240 if (
RHS.getMinValue().uge(
LHS.getMaxValue()))
256 if (
LHS.getSignedMinValue().sge(
RHS.getSignedMaxValue()))
259 if (
RHS.getSignedMinValue().sge(
LHS.getSignedMaxValue()))
269 unsigned SignBitPosition =
LHS.getBitWidth() - 1;
270 for (
auto Arg : {&
LHS, &
RHS}) {
271 bool Tmp = Arg->Zero[SignBitPosition];
272 Arg->Zero.setBitVal(SignBitPosition, Arg->One[SignBitPosition]);
273 Arg->One.setBitVal(SignBitPosition, Tmp);
292 bool NSW,
bool ShAmtNonZero) {
294 auto ShiftByConst = [&](
const KnownBits &
LHS,
unsigned ShiftAmt) {
296 bool ShiftedOutZero, ShiftedOutOne;
297 Known.
Zero =
LHS.Zero.ushl_ov(ShiftAmt, ShiftedOutZero);
299 Known.
One =
LHS.One.ushl_ov(ShiftAmt, ShiftedOutOne);
303 if (NUW && ShiftAmt != 0)
305 ShiftedOutZero =
true;
309 else if (ShiftedOutOne)
317 unsigned MinShiftAmount =
RHS.getMinValue().getLimitedValue(
BitWidth);
318 if (MinShiftAmount == 0 && ShAmtNonZero)
320 if (
LHS.isUnknown()) {
322 if (NUW && NSW && MinShiftAmount != 0)
331 MaxShiftAmount = std::min(MaxShiftAmount,
LHS.countMaxLeadingZeros() - 1);
333 MaxShiftAmount = std::min(MaxShiftAmount,
LHS.countMaxLeadingZeros());
335 MaxShiftAmount = std::min(
337 std::max(
LHS.countMaxLeadingZeros(),
LHS.countMaxLeadingOnes()) - 1);
340 if (MinShiftAmount == 0 && MaxShiftAmount ==
BitWidth - 1 &&
346 if (
LHS.isNonNegative())
348 if (
LHS.isNegative())
355 unsigned ShiftAmtZeroMask =
RHS.Zero.zextOrTrunc(32).getZExtValue();
356 unsigned ShiftAmtOneMask =
RHS.One.zextOrTrunc(32).getZExtValue();
359 for (
unsigned ShiftAmt = MinShiftAmount; ShiftAmt <= MaxShiftAmount;
362 if ((ShiftAmtZeroMask & ShiftAmt) != 0 ||
363 (ShiftAmtOneMask | ShiftAmt) != ShiftAmt)
377 bool ShAmtNonZero,
bool Exact) {
379 auto ShiftByConst = [&](
const KnownBits &
LHS,
unsigned ShiftAmt) {
390 unsigned MinShiftAmount =
RHS.getMinValue().getLimitedValue(
BitWidth);
391 if (MinShiftAmount == 0 && ShAmtNonZero)
393 if (
LHS.isUnknown()) {
404 unsigned FirstOne =
LHS.countMaxTrailingZeros();
405 if (FirstOne < MinShiftAmount) {
410 MaxShiftAmount = std::min(MaxShiftAmount, FirstOne);
413 unsigned ShiftAmtZeroMask =
RHS.Zero.zextOrTrunc(32).getZExtValue();
414 unsigned ShiftAmtOneMask =
RHS.One.zextOrTrunc(32).getZExtValue();
417 for (
unsigned ShiftAmt = MinShiftAmount; ShiftAmt <= MaxShiftAmount;
420 if ((ShiftAmtZeroMask & ShiftAmt) != 0 ||
421 (ShiftAmtOneMask | ShiftAmt) != ShiftAmt)
435 bool ShAmtNonZero,
bool Exact) {
437 auto ShiftByConst = [&](
const KnownBits &
LHS,
unsigned ShiftAmt) {
446 unsigned MinShiftAmount =
RHS.getMinValue().getLimitedValue(
BitWidth);
447 if (MinShiftAmount == 0 && ShAmtNonZero)
449 if (
LHS.isUnknown()) {
464 unsigned FirstOne =
LHS.countMaxTrailingZeros();
465 if (FirstOne < MinShiftAmount) {
470 MaxShiftAmount = std::min(MaxShiftAmount, FirstOne);
473 unsigned ShiftAmtZeroMask =
RHS.Zero.zextOrTrunc(32).getZExtValue();
474 unsigned ShiftAmtOneMask =
RHS.One.zextOrTrunc(32).getZExtValue();
477 for (
unsigned ShiftAmt = MinShiftAmount; ShiftAmt <= MaxShiftAmount;
480 if ((ShiftAmtZeroMask & ShiftAmt) != 0 ||
481 (ShiftAmtOneMask | ShiftAmt) != ShiftAmt)
495 if (
LHS.isConstant() &&
RHS.isConstant())
496 return std::optional<bool>(
LHS.getConstant() ==
RHS.getConstant());
497 if (
LHS.One.intersects(
RHS.Zero) ||
RHS.One.intersects(
LHS.Zero))
498 return std::optional<bool>(
false);
503 if (std::optional<bool> KnownEQ =
eq(
LHS,
RHS))
504 return std::optional<bool>(!*KnownEQ);
510 if (
LHS.getMaxValue().ule(
RHS.getMinValue()))
511 return std::optional<bool>(
false);
513 if (
LHS.getMinValue().ugt(
RHS.getMaxValue()))
514 return std::optional<bool>(
true);
519 if (std::optional<bool> IsUGT =
ugt(
RHS,
LHS))
520 return std::optional<bool>(!*IsUGT);
534 if (
LHS.getSignedMaxValue().sle(
RHS.getSignedMinValue()))
535 return std::optional<bool>(
false);
537 if (
LHS.getSignedMinValue().sgt(
RHS.getSignedMaxValue()))
538 return std::optional<bool>(
true);
543 if (std::optional<bool> KnownSGT =
sgt(
RHS,
LHS))
544 return std::optional<bool>(!*KnownSGT);
575 false, IntMinIsPoison,
false,
618 assert(!
LHS.hasConflict() && !
RHS.hasConflict() &&
"Bad inputs");
624 auto SignBitKnown = [&](
const KnownBits &K) {
627 std::optional<bool> Overflow;
632 if (SignBitKnown(
LHS) && SignBitKnown(
RHS) && SignBitKnown(Res)) {
635 Overflow = (
LHS.isNonNegative() ==
RHS.isNonNegative() &&
639 Overflow = (
LHS.isNonNegative() !=
RHS.isNonNegative() &&
646 (void)
LHS.getMaxValue().uadd_ov(
RHS.getMaxValue(), Of);
650 (void)
LHS.getMinValue().uadd_ov(
RHS.getMinValue(), Of);
657 (void)
LHS.getMinValue().usub_ov(
RHS.getMaxValue(), Of);
661 (void)
LHS.getMaxValue().usub_ov(
RHS.getMinValue(), Of);
669 if (
LHS.isNonNegative() &&
RHS.isNonNegative()) {
674 if (
LHS.isNegative() &&
RHS.isNegative()) {
680 if (
LHS.isNegative() &&
RHS.isNonNegative()) {
684 }
else if (
LHS.isNonNegative() &&
RHS.isNegative()) {
694 unsigned LeadingKnown;
697 std::max(
LHS.countMinLeadingOnes(),
RHS.countMinLeadingOnes());
700 std::max(
LHS.countMinLeadingZeros(),
RHS.countMinLeadingOnes());
727 "We somehow know overflow without knowing input sign");
778 bool NoUndefSelfMultiply) {
781 !
RHS.hasConflict() &&
"Operand mismatch");
783 "Self multiplication knownbits mismatch");
796 APInt UMaxResult = UMaxLHS.
umul_ov(UMaxRHS, HasOverflow);
797 unsigned LeadZ = HasOverflow ? 0 : UMaxResult.
countl_zero();
848 unsigned TrailZero0 =
LHS.countMinTrailingZeros();
849 unsigned TrailZero1 =
RHS.countMinTrailingZeros();
850 unsigned TrailZ = TrailZero0 + TrailZero1;
853 unsigned SmallestOperand =
854 std::min(TrailBitsKnown0 - TrailZero0, TrailBitsKnown1 - TrailZero1);
855 unsigned ResultBitsKnown = std::min(SmallestOperand + TrailZ,
BitWidth);
862 Res.
Zero |= (~BottomKnown).getLoBits(ResultBitsKnown);
866 if (NoUndefSelfMultiply &&
BitWidth > 1) {
868 "Self-multiplication failed Quadratic Reciprocity!");
878 !
RHS.hasConflict() &&
"Operand mismatch");
887 !
RHS.hasConflict() &&
"Operand mismatch");
906 (int)
LHS.countMinTrailingZeros() - (int)
RHS.countMaxTrailingZeros();
908 (int)
LHS.countMaxTrailingZeros() - (int)
RHS.countMinTrailingZeros();
912 if (MinTZ == MaxTZ) {
916 }
else if (MaxTZ < 0) {
932 if (
LHS.isNonNegative() &&
RHS.isNonNegative())
936 assert(!
LHS.hasConflict() && !
RHS.hasConflict() &&
"Bad inputs");
939 if (
LHS.isZero() ||
RHS.isZero()) {
946 std::optional<APInt> Res;
947 if (
LHS.isNegative() &&
RHS.isNegative()) {
949 APInt Denom =
RHS.getSignedMaxValue();
950 APInt Num =
LHS.getSignedMinValue();
956 }
else if (
LHS.isNegative() &&
RHS.isNonNegative()) {
958 if (Exact || (-
LHS.getSignedMaxValue()).uge(
RHS.getSignedMaxValue())) {
959 APInt Denom =
RHS.getSignedMinValue();
960 APInt Num =
LHS.getSignedMinValue();
963 }
else if (
LHS.isStrictlyPositive() &&
RHS.isNegative()) {
965 if (Exact ||
LHS.getSignedMinValue().uge(-
RHS.getSignedMinValue())) {
966 APInt Denom =
RHS.getSignedMaxValue();
967 APInt Num =
LHS.getSignedMaxValue();
968 Res = Num.
sdiv(Denom);
973 if (Res->isNonNegative()) {
977 unsigned LeadO = Res->countLeadingOnes();
994 if (
LHS.isZero() ||
RHS.isZero()) {
1004 APInt MinDenom =
RHS.getMinValue();
1019 if (!
RHS.isZero() &&
RHS.Zero[0]) {
1021 unsigned RHSZeros =
RHS.countMinTrailingZeros();
1034 if (
RHS.isConstant() &&
RHS.getConstant().isPowerOf2()) {
1036 APInt HighBits = ~(
RHS.getConstant() - 1);
1037 Known.
Zero |= HighBits;
1044 std::max(
LHS.countMinLeadingZeros(),
RHS.countMinLeadingZeros());
1053 if (
RHS.isConstant() &&
RHS.getConstant().isPowerOf2()) {
1055 APInt LowBits =
RHS.getConstant() - 1;
1059 Known.
Zero |= ~LowBits;
1064 Known.
One |= ~LowBits;
1097 Zero = std::move(Z);
static KnownBits computeForSatAddSub(bool Add, bool Signed, const KnownBits &LHS, const KnownBits &RHS)
static KnownBits divComputeLowBit(KnownBits Known, const KnownBits &LHS, const KnownBits &RHS, bool Exact)
static KnownBits computeForAddCarry(const KnownBits &LHS, const KnownBits &RHS, bool CarryZero, bool CarryOne)
static unsigned getMaxShiftAmount(const APInt &MaxValue, unsigned BitWidth)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Class for arbitrary precision integers.
APInt umul_ov(const APInt &RHS, bool &Overflow) const
APInt udiv(const APInt &RHS) const
Unsigned division operation.
APInt getLoBits(unsigned numBits) const
Compute an APInt containing numBits lowbits from this APInt.
bool isMinSignedValue() const
Determine if this is the smallest signed value.
void setHighBits(unsigned hiBits)
Set the top hiBits bits.
unsigned popcount() const
Count the number of bits set.
void setBitsFrom(unsigned loBit)
Set the top bits starting from loBit.
uint64_t extractBitsAsZExtValue(unsigned numBits, unsigned bitPosition) const
APInt trunc(unsigned width) const
Truncate to new width.
static APInt getMaxValue(unsigned numBits)
Gets maximum unsigned value of APInt for specific bit width.
void setBit(unsigned BitPosition)
Set the given bit to 1 whose position is given as "bitPosition".
bool isAllOnes() const
Determine if all bits are set. This is true for zero-width values.
bool isZero() const
Determine if this value is zero, i.e. all bits are clear.
void setSignBit()
Set the sign bit to 1.
static APInt getSignedMaxValue(unsigned numBits)
Gets maximum signed value of APInt for a specific bit width.
static APInt getMinValue(unsigned numBits)
Gets minimum unsigned value of APInt for a specific bit width.
bool isNegative() const
Determine sign of this APInt.
bool intersects(const APInt &RHS) const
This operation tests if there are any pairs of corresponding bits between this APInt and RHS that are...
APInt sdiv(const APInt &RHS) const
Signed division function for APInt.
void clearAllBits()
Set every bit to 0.
void ashrInPlace(unsigned ShiftAmt)
Arithmetic right-shift this APInt by ShiftAmt in place.
unsigned countl_zero() const
The APInt version of std::countl_zero.
static APInt getSignedMinValue(unsigned numBits)
Gets minimum signed value of APInt for a specific bit width.
unsigned countLeadingZeros() const
unsigned countl_one() const
Count the number of leading one bits.
void clearLowBits(unsigned loBits)
Set bottom loBits bits to 0.
uint64_t getLimitedValue(uint64_t Limit=UINT64_MAX) const
If this value is smaller than the specified limit, return it, otherwise return the limit value.
void setAllBits()
Set every bit to 1.
bool getBoolValue() const
Convert APInt to a boolean value.
bool isNonNegative() const
Determine if this APInt Value is non-negative (>= 0)
void setBits(unsigned loBit, unsigned hiBit)
Set the bits from loBit (inclusive) to hiBit (exclusive) to 1.
bool isSubsetOf(const APInt &RHS) const
This operation checks that all bits set in this APInt are also set in RHS.
static APInt getLowBitsSet(unsigned numBits, unsigned loBitsSet)
Constructs an APInt value that has the bottom loBitsSet bits set.
static APInt getHighBitsSet(unsigned numBits, unsigned hiBitsSet)
Constructs an APInt value that has the top hiBitsSet bits set.
void setLowBits(unsigned loBits)
Set the bottom loBits bits.
void lshrInPlace(unsigned ShiftAmt)
Logical right-shift this APInt by ShiftAmt in place.
void setBitVal(unsigned BitPosition, bool BitValue)
Set a given bit to a given value.
void clearSignBit()
Set the sign bit to 0.
This class implements an extremely fast bulk output stream that can only output to a stream.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
int countr_one(T Value)
Count the number of ones from the least significant bit to the first zero bit.
unsigned Log2_32(uint32_t Value)
Return the floor log base 2 of the specified value, -1 if the value is zero.
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
int countl_one(T Value)
Count the number of ones from the most significant bit to the first zero bit.
constexpr unsigned BitWidth
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
static KnownBits makeConstant(const APInt &C)
Create known bits from a known constant.
static KnownBits sadd_sat(const KnownBits &LHS, const KnownBits &RHS)
Compute knownbits resulting from llvm.sadd.sat(LHS, RHS)
static std::optional< bool > eq(const KnownBits &LHS, const KnownBits &RHS)
Determine if these known bits always give the same ICMP_EQ result.
KnownBits sextInReg(unsigned SrcBitWidth) const
Return known bits for a in-register sign extension of the value we're tracking.
static KnownBits mulhu(const KnownBits &LHS, const KnownBits &RHS)
Compute known bits from zero-extended multiply-hi.
static KnownBits smax(const KnownBits &LHS, const KnownBits &RHS)
Compute known bits for smax(LHS, RHS).
bool isNonNegative() const
Returns true if this value is known to be non-negative.
KnownBits blsi() const
Compute known bits for X & -X, which has only the lowest bit set of X set.
void makeNonNegative()
Make this value non-negative.
static KnownBits usub_sat(const KnownBits &LHS, const KnownBits &RHS)
Compute knownbits resulting from llvm.usub.sat(LHS, RHS)
unsigned countMinTrailingZeros() const
Returns the minimum number of trailing zero bits.
static KnownBits ashr(const KnownBits &LHS, const KnownBits &RHS, bool ShAmtNonZero=false, bool Exact=false)
Compute known bits for ashr(LHS, RHS).
static KnownBits ssub_sat(const KnownBits &LHS, const KnownBits &RHS)
Compute knownbits resulting from llvm.ssub.sat(LHS, RHS)
static KnownBits urem(const KnownBits &LHS, const KnownBits &RHS)
Compute known bits for urem(LHS, RHS).
bool isUnknown() const
Returns true if we don't know any bits.
unsigned countMaxTrailingZeros() const
Returns the maximum number of trailing zero bits possible.
static std::optional< bool > ne(const KnownBits &LHS, const KnownBits &RHS)
Determine if these known bits always give the same ICMP_NE result.
KnownBits makeGE(const APInt &Val) const
Return KnownBits based on this, but updated given that the underlying value is known to be greater th...
KnownBits blsmsk() const
Compute known bits for X ^ (X - 1), which has all bits up to and including the lowest set bit of X se...
void makeNegative()
Make this value negative.
bool hasConflict() const
Returns true if there is conflicting information.
static std::optional< bool > sge(const KnownBits &LHS, const KnownBits &RHS)
Determine if these known bits always give the same ICMP_SGE result.
unsigned countMaxPopulation() const
Returns the maximum number of bits that could be one.
void setAllZero()
Make all bits known to be zero and discard any previous information.
KnownBits & operator|=(const KnownBits &RHS)
Update known bits based on ORing with RHS.
void print(raw_ostream &OS) const
unsigned getBitWidth() const
Get the bit width of this value.
static KnownBits umax(const KnownBits &LHS, const KnownBits &RHS)
Compute known bits for umax(LHS, RHS).
static KnownBits lshr(const KnownBits &LHS, const KnownBits &RHS, bool ShAmtNonZero=false, bool Exact=false)
Compute known bits for lshr(LHS, RHS).
static KnownBits abdu(const KnownBits &LHS, const KnownBits &RHS)
Compute known bits for abdu(LHS, RHS).
KnownBits extractBits(unsigned NumBits, unsigned BitPosition) const
Return a subset of the known bits from [bitPosition,bitPosition+numBits).
KnownBits intersectWith(const KnownBits &RHS) const
Returns KnownBits information that is known to be true for both this and RHS.
static KnownBits computeForSubBorrow(const KnownBits &LHS, KnownBits RHS, const KnownBits &Borrow)
Compute known bits results from subtracting RHS from LHS with 1-bit Borrow.
unsigned countMinLeadingZeros() const
Returns the minimum number of leading zero bits.
static KnownBits abds(KnownBits LHS, KnownBits RHS)
Compute known bits for abds(LHS, RHS).
static KnownBits smin(const KnownBits &LHS, const KnownBits &RHS)
Compute known bits for smin(LHS, RHS).
KnownBits & operator&=(const KnownBits &RHS)
Update known bits based on ANDing with RHS.
static KnownBits mulhs(const KnownBits &LHS, const KnownBits &RHS)
Compute known bits from sign-extended multiply-hi.
static KnownBits srem(const KnownBits &LHS, const KnownBits &RHS)
Compute known bits for srem(LHS, RHS).
static std::optional< bool > ugt(const KnownBits &LHS, const KnownBits &RHS)
Determine if these known bits always give the same ICMP_UGT result.
static KnownBits udiv(const KnownBits &LHS, const KnownBits &RHS, bool Exact=false)
Compute known bits for udiv(LHS, RHS).
static std::optional< bool > slt(const KnownBits &LHS, const KnownBits &RHS)
Determine if these known bits always give the same ICMP_SLT result.
static KnownBits computeForAddSub(bool Add, bool NSW, bool NUW, const KnownBits &LHS, const KnownBits &RHS)
Compute known bits resulting from adding LHS and RHS.
static KnownBits sdiv(const KnownBits &LHS, const KnownBits &RHS, bool Exact=false)
Compute known bits for sdiv(LHS, RHS).
static std::optional< bool > ult(const KnownBits &LHS, const KnownBits &RHS)
Determine if these known bits always give the same ICMP_ULT result.
static std::optional< bool > ule(const KnownBits &LHS, const KnownBits &RHS)
Determine if these known bits always give the same ICMP_ULE result.
bool isNegative() const
Returns true if this value is known to be negative.
static KnownBits computeForAddCarry(const KnownBits &LHS, const KnownBits &RHS, const KnownBits &Carry)
Compute known bits resulting from adding LHS, RHS and a 1-bit Carry.
static KnownBits uadd_sat(const KnownBits &LHS, const KnownBits &RHS)
Compute knownbits resulting from llvm.uadd.sat(LHS, RHS)
static KnownBits mul(const KnownBits &LHS, const KnownBits &RHS, bool NoUndefSelfMultiply=false)
Compute known bits resulting from multiplying LHS and RHS.
KnownBits abs(bool IntMinIsPoison=false) const
Compute known bits for the absolute value.
static std::optional< bool > sle(const KnownBits &LHS, const KnownBits &RHS)
Determine if these known bits always give the same ICMP_SLE result.
static std::optional< bool > sgt(const KnownBits &LHS, const KnownBits &RHS)
Determine if these known bits always give the same ICMP_SGT result.
unsigned countMinPopulation() const
Returns the number of bits known to be one.
static std::optional< bool > uge(const KnownBits &LHS, const KnownBits &RHS)
Determine if these known bits always give the same ICMP_UGE result.
KnownBits & operator^=(const KnownBits &RHS)
Update known bits based on XORing with RHS.
static KnownBits shl(const KnownBits &LHS, const KnownBits &RHS, bool NUW=false, bool NSW=false, bool ShAmtNonZero=false)
Compute known bits for shl(LHS, RHS).
static KnownBits umin(const KnownBits &LHS, const KnownBits &RHS)
Compute known bits for umin(LHS, RHS).