aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Support/KnownBits.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/KnownBits.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/Support/KnownBits.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/KnownBits.cpp b/contrib/llvm-project/llvm/lib/Support/KnownBits.cpp
index 8f3f4aa8caea..a6c591fca312 100644
--- a/contrib/llvm-project/llvm/lib/Support/KnownBits.cpp
+++ b/contrib/llvm-project/llvm/lib/Support/KnownBits.cpp
@@ -21,8 +21,8 @@ static KnownBits computeForAddCarry(
assert(!(CarryZero && CarryOne) &&
"Carry can't be zero and one at the same time");
- APInt PossibleSumZero = LHS.getMaxValue() + RHS.getMaxValue() + !CarryZero;
- APInt PossibleSumOne = LHS.getMinValue() + RHS.getMinValue() + CarryOne;
+ APInt PossibleSumZero = ~LHS.Zero + ~RHS.Zero + !CarryZero;
+ APInt PossibleSumOne = LHS.One + RHS.One + CarryOne;
// Compute known bits of the carry.
APInt CarryKnownZero = ~(PossibleSumZero ^ LHS.Zero ^ RHS.Zero);