diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index b02d2923b8ee..37ddc0ac862f 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -3430,7 +3430,7 @@ static bool EliminateDeadSwitchCases(SwitchInst *SI, AssumptionCache *AC, !isa(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)) {