Silencing a -Wtype-limits warning; an unsigned value will always be >= 0; NFC.
authorAaron Ballman <aaron@aaronballman.com>
Thu, 15 Oct 2015 13:55:43 +0000 (13:55 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 15 Oct 2015 13:55:43 +0000 (13:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250404 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ValueTracking.cpp

index d2a1f8737cda4d2805adb2b337ba24d1a3af6dc6..e83a5793bf3413ad65ff597ca5c807da5534c08f 100644 (file)
@@ -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