From: Filipe Cabecinhas Date: Thu, 10 Sep 2015 22:34:39 +0000 (+0000) Subject: Remove gcc warning when comparing an unsigned var for >= 0 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4d0f917f947f96d50ba4841d76b22a3d797889f9;p=oota-llvm.git Remove gcc warning when comparing an unsigned var for >= 0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247352 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index b02d2923b8e..37ddc0ac862 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/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)) {