From: Eli Friedman Date: Thu, 8 Sep 2011 21:00:31 +0000 (+0000) Subject: Make sure to handle the case where emitPredicateMatch returns false. Noticed by... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=64a17b309d37adca776acd528cccadd20d0dfe26;p=oota-llvm.git Make sure to handle the case where emitPredicateMatch returns false. Noticed by inspection. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139317 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/FixedLenDecoderEmitter.cpp b/utils/TableGen/FixedLenDecoderEmitter.cpp index 61a0d614a47..33c97c9c2df 100644 --- a/utils/TableGen/FixedLenDecoderEmitter.cpp +++ b/utils/TableGen/FixedLenDecoderEmitter.cpp @@ -818,7 +818,8 @@ bool FilterChooser::emitSingletonDecoder(raw_ostream &o, unsigned &Indentation, // If we have matched all the well-known bits, just issue a return. if (Size == 0) { o.indent(Indentation) << "if ("; - emitPredicateMatch(o, Indentation, Opc); + if (!emitPredicateMatch(o, Indentation, Opc)) + o << "1"; o << ") {\n"; o.indent(Indentation) << " MI.setOpcode(" << Opc << ");\n"; std::vector& InsnOperands = Operands[Opc];