aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-07-20 23:36:20 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-07-20 23:36:20 +0000
commiteb1f40d3afe8aa5c9af0cad7e26cd3981dbc95cc (patch)
tree8c2b81fc6cabee1b794c7096752d85eb22d3e2b3
parent1e1a88e8cc6c51d0f00ecdbdbcf40bd23e124d27 (diff)
downloadexternal_llvm-eb1f40d3afe8aa5c9af0cad7e26cd3981dbc95cc.zip
external_llvm-eb1f40d3afe8aa5c9af0cad7e26cd3981dbc95cc.tar.gz
external_llvm-eb1f40d3afe8aa5c9af0cad7e26cd3981dbc95cc.tar.bz2
Also checks for noResults field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29235 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index 9f19137..5f522d3 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -742,8 +742,11 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
assert(NumResults <= 1 &&
"Only supports zero or one result instrs!");
+
+ CodeGenInstruction &InstInfo =
+ ISE.getTargetInfo().getInstruction(getOperator()->getName());
// Apply the result type to the node
- if (NumResults == 0) {
+ if (NumResults == 0 || InstInfo.noResults) { // FIXME: temporary hack...
MadeChange = UpdateNodeType(MVT::isVoid, TP);
} else {
Record *ResultNode = Inst.getResult(0);