Remove gcc warning when comparing an unsigned var for >= 0

llvm-svn: 247352
This commit is contained in:
Filipe Cabecinhas 2015-09-10 22:34:39 +00:00
parent ce13007f06
commit 48b090a31f
1 changed files with 1 additions and 1 deletions

View File

@ -3430,7 +3430,7 @@ static bool EliminateDeadSwitchCases(SwitchInst *SI, AssumptionCache *AC,
!isa<UnreachableInst>(SI->getDefaultDest()->getFirstNonPHIOrDbg());
const unsigned NumUnknownBits = Bits -
(KnownZero.Or(KnownOne)).countPopulation();
assert(0 <= NumUnknownBits && NumUnknownBits <= Bits);
assert(NumUnknownBits <= Bits);
if (HasDefault && DeadCases.empty() &&
NumUnknownBits < 64 /* avoid overflow */ &&
SI->getNumCases() == (1ULL << NumUnknownBits)) {