[llvm] r247352 - Remove gcc warning when comparing an unsigned var for >= 0
Filipe Cabecinhas via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 15:34:39 PDT 2015
Author: filcab
Date: Thu Sep 10 17:34:39 2015
New Revision: 247352
URL: http://llvm.org/viewvc/llvm-project?rev=247352&view=rev
Log:
Remove gcc warning when comparing an unsigned var for >= 0
Modified:
llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=247352&r1=247351&r2=247352&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Thu Sep 10 17:34:39 2015
@@ -3430,7 +3430,7 @@ static bool EliminateDeadSwitchCases(Swi
!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)) {
More information about the llvm-commits
mailing list