Skip to content

Commit

Permalink
Silencing a -Wtype-limits warning; an unsigned value will always be >…
Browse files Browse the repository at this point in the history
…= 0; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250404 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
AaronBallman committed Oct 15, 2015
1 parent f657b63 commit ae7c0e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Analysis/ValueTracking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ae7c0e8

Please sign in to comment.