1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

Silencing a -Wtype-limits warning; an unsigned value will always be >= 0; NFC.

llvm-svn: 250404
This commit is contained in:
Aaron Ballman 2015-10-15 13:55:43 +00:00
parent bd521d55a0
commit 8601c2e902

View 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