From 94c6f2c3b560c244366d319753e9b17a0a5c7e9e Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 20 Jul 2006 23:36:20 +0000 Subject: [PATCH] Also checks for noResults field. llvm-svn: 29235 --- utils/TableGen/DAGISelEmitter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index 9f1913798d8..5f522d38822 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);