aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenTarget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--utils/TableGen/CodeGenTarget.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index 18e11bdb6f..71fc824ead 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -370,8 +370,8 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
usesCustomDAGSchedInserter = R->getValueAsBit("usesCustomDAGSchedInserter");
hasCtrlDep = R->getValueAsBit("hasCtrlDep");
noResults = R->getValueAsBit("noResults");
- clobbersPred = R->getValueAsBit("clobbersPred");
isNotDuplicable = R->getValueAsBit("isNotDuplicable");
+ hasOptionalDef = false;
hasVariableNumberOfOperands = false;
DagInit *DI;
@@ -411,9 +411,10 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
if (unsigned NumArgs = MIOpInfo->getNumArgs())
NumOps = NumArgs;
- if (Rec->isSubClassOf("PredicateOperand")) {
+ if (Rec->isSubClassOf("PredicateOperand"))
isPredicable = true;
- }
+ else if (Rec->isSubClassOf("OptionalDefOperand"))
+ hasOptionalDef = true;
} else if (Rec->getName() == "variable_ops") {
hasVariableNumberOfOperands = true;
continue;