From 335c0ca2c667cb6c7bdf35c4286862fbf1f46142 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sun, 3 Aug 2014 23:00:38 +0000 Subject: [PATCH] CodeGen: silence a warning GCC 4.8.2 objects to the tautological condition in the assert as the unsigned value is guaranteed to be >= 0. Simplify the assertion by dropping the tautological condition. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214671 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineCombiner.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/CodeGen/MachineCombiner.cpp b/lib/CodeGen/MachineCombiner.cpp index 591c4caf66e..9ec7239b098 100644 --- a/lib/CodeGen/MachineCombiner.cpp +++ b/lib/CodeGen/MachineCombiner.cpp @@ -144,8 +144,7 @@ MachineCombiner::getDepth(SmallVectorImpl &InsInstrs, InstrIdxForVirtReg.find(MO.getReg()); if (II != InstrIdxForVirtReg.end()) { // Operand is new virtual register not in trace - assert(II->second >= 0 && II->second < InstrDepth.size() && - "Bad Index"); + assert(II->second < InstrDepth.size() && "Bad Index"); MachineInstr *DefInstr = InsInstrs[II->second]; assert(DefInstr && "There must be a definition for a new virtual register"); -- 2.34.1