Make sure to handle the case where emitPredicateMatch returns false. Noticed by inspection.

llvm-svn: 139317
This commit is contained in:
Eli Friedman 2011-09-08 21:00:31 +00:00
parent 7b46bb8e32
commit e776b580c1
1 changed files with 2 additions and 1 deletions

View File

@ -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<OperandInfo>& InsnOperands = Operands[Opc];