summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-03-24 05:38:09 +0000
committerCraig Topper <craig.topper@gmail.com>2017-03-24 05:38:09 +0000
commit059b98e044873f7c7e56f2caa654281279d8d060 (patch)
treef7491f1fadc3157c21095785f902443ec93c87bb /llvm/lib/Analysis/ValueTracking.cpp
parent9d0796e5d0346c8444adf59c5dfa338ca2fb3f01 (diff)
downloadbcm5719-llvm-059b98e044873f7c7e56f2caa654281279d8d060.tar.gz
bcm5719-llvm-059b98e044873f7c7e56f2caa654281279d8d060.zip
[ValueTracking] Use uint64_t for CarryIn in computeKnownBitsAddSub instead of a creating a temporary APInt. NFC
llvm-svn: 298688
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 21c1595f094..6f043666cef 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -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;
OpenPOWER on IntegriCloud