From: Chris Lattner Date: Tue, 23 Feb 2010 01:07:39 +0000 (+0000) Subject: really fix an off-by-one error X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=860d4a787f28f5f31e0c172e2ab80f5ab93cbf9b;p=oota-llvm.git really fix an off-by-one error git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96845 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp index ed720df8081..c3169509db5 100644 --- a/utils/TableGen/DAGISelMatcherEmitter.cpp +++ b/utils/TableGen/DAGISelMatcherEmitter.cpp @@ -137,7 +137,7 @@ static unsigned EmitVBRValue(unsigned Val, raw_ostream &OS) { unsigned InVal = Val; unsigned NumBytes = 0; - while (Val > 128) { + while (Val >= 128) { OS << (Val&127) << "|128,"; Val >>= 7; ++NumBytes;