Skip to content

Commit

Permalink
[ValueTracking] Use uint64_t for CarryIn in computeKnownBitsAddSub in…
Browse files Browse the repository at this point in the history
…stead of a creating a temporary APInt. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298688 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
topperc committed Mar 24, 2017
1 parent fdd2b65 commit 8a6bd3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Analysis/ValueTracking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,11 @@ static void computeKnownBitsAddSub(bool Add, const Value *Op0, const Value *Op1,
computeKnownBits(Op1, KnownZero2, KnownOne2, Depth + 1, Q);

// Carry in a 1 for a subtract, rather than a 0.
APInt CarryIn(BitWidth, 0);
uint64_t CarryIn = 0;
if (!Add) {
// Sum = LHS + ~RHS + 1
std::swap(KnownZero2, KnownOne2);
CarryIn.setBit(0);
CarryIn = 1;
}

APInt PossibleSumZero = ~LHSKnownZero + ~KnownZero2 + CarryIn;
Expand Down

0 comments on commit 8a6bd3f

Please sign in to comment.