From fd4451674b0f7c631fe69548e473d02e912ce386 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 8 Sep 2011 21:00:31 +0000 Subject: [PATCH] Make sure to handle the case where emitPredicateMatch returns false. Noticed by inspection. llvm-svn: 139317 --- utils/TableGen/FixedLenDecoderEmitter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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];