summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index d2a1f8737cd..e83a5793bf3 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -1382,7 +1382,7 @@ static void computeKnownBitsFromOperator(Operator *I, APInt &KnownZero,
unsigned BitsPossiblySet = BitWidth - KnownZero2.countPopulation();
unsigned LeadingZeros =
APInt(BitWidth, BitsPossiblySet).countLeadingZeros();
- assert(LeadingZeros >= 0 && LeadingZeros <= BitWidth);
+ assert(LeadingZeros <= BitWidth);
KnownZero |= APInt::getHighBitsSet(BitWidth, LeadingZeros);
KnownOne &= ~KnownZero;
// TODO: we could bound KnownOne using the lower bound on the number
OpenPOWER on IntegriCloud