forked from OSchip/llvm-project
Silencing a -Wtype-limits warning; an unsigned value will always be >= 0; NFC.
llvm-svn: 250404
This commit is contained in:
parent
430443ba61
commit
58f413c518
|
@ -1382,7 +1382,7 @@ static void computeKnownBitsFromOperator(Operator *I, APInt &KnownZero,
|
||||||
unsigned BitsPossiblySet = BitWidth - KnownZero2.countPopulation();
|
unsigned BitsPossiblySet = BitWidth - KnownZero2.countPopulation();
|
||||||
unsigned LeadingZeros =
|
unsigned LeadingZeros =
|
||||||
APInt(BitWidth, BitsPossiblySet).countLeadingZeros();
|
APInt(BitWidth, BitsPossiblySet).countLeadingZeros();
|
||||||
assert(LeadingZeros >= 0 && LeadingZeros <= BitWidth);
|
assert(LeadingZeros <= BitWidth);
|
||||||
KnownZero |= APInt::getHighBitsSet(BitWidth, LeadingZeros);
|
KnownZero |= APInt::getHighBitsSet(BitWidth, LeadingZeros);
|
||||||
KnownOne &= ~KnownZero;
|
KnownOne &= ~KnownZero;
|
||||||
// TODO: we could bound KnownOne using the lower bound on the number
|
// TODO: we could bound KnownOne using the lower bound on the number
|
||||||
|
|
Loading…
Reference in New Issue