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 61a0d61..33c97c9 100644
--- a/utils/TableGen/FixedLenDecoderEmitter.cpp
+++ b/utils/TableGen/FixedLenDecoderEmitter.cpp
@@ -818,7 +818,8 @@
// 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<OperandInfo>& InsnOperands = Operands[Opc];