33 APInt CarryKnownZero = ~(PossibleSumZero ^ LHS.
Zero ^ RHS.
Zero);
34 APInt CarryKnownOne = PossibleSumOne ^ LHS.
One ^ RHS.
One;
39 APInt CarryKnownUnion = std::move(CarryKnownZero) | CarryKnownOne;
40 APInt Known = std::move(LHSKnownUnion) & RHSKnownUnion & CarryKnownUnion;
42 assert((PossibleSumZero & Known) == (PossibleSumOne & Known) &&
43 "known bits of sum differ");
47 KnownOut.
Zero = ~
std::move(PossibleSumZero) & Known;
48 KnownOut.
One = std::move(PossibleSumOne) & Known;
51 if (!Known.isSignBitSet()) {
This class represents lattice values for constants.
static KnownBits computeForAddSub(bool Add, bool NSW, const KnownBits &LHS, KnownBits RHS)
Compute known bits resulting from adding LHS and RHS.
bool isNegative() const
Returns true if this value is known to be negative.
void makeNonNegative()
Make this value non-negative.
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
Class for arbitrary precision integers.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool isNonNegative() const
Returns true if this value is known to be non-negative.
void makeNegative()
Make this value negative.