[llvm-commits] [llvm] r139317 - /llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp

Eli Friedman eli.friedman at gmail.com
Thu Sep 8 14:00:31 PDT 2011


Author: efriedma
Date: Thu Sep  8 16:00:31 2011
New Revision: 139317

URL: http://llvm.org/viewvc/llvm-project?rev=139317&view=rev
Log:
Make sure to handle the case where emitPredicateMatch returns false.  Noticed by inspection.


Modified:
    llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp

Modified: llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp?rev=139317&r1=139316&r2=139317&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp Thu Sep  8 16:00:31 2011
@@ -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];





More information about the llvm-commits mailing list