diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-09-08 21:00:31 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-09-08 21:00:31 +0000 |
commit | 64a17b309d37adca776acd528cccadd20d0dfe26 (patch) | |
tree | c237e6771cdf8938d9f2c990ec10a9b7c0292774 /utils/TableGen/FixedLenDecoderEmitter.cpp | |
parent | 5afc19002e7a6b949619a5073d8c746985e8d6f2 (diff) |
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
Diffstat (limited to 'utils/TableGen/FixedLenDecoderEmitter.cpp')
-rw-r--r-- | utils/TableGen/FixedLenDecoderEmitter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/TableGen/FixedLenDecoderEmitter.cpp b/utils/TableGen/FixedLenDecoderEmitter.cpp index 61a0d614a4..33c97c9c2d 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<OperandInfo>& InsnOperands = Operands[Opc]; |