Also checks for noResults field.
llvm-svn: 29235
diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp
index 9f19137..5f522d3 100644
--- a/llvm/utils/TableGen/DAGISelEmitter.cpp
+++ b/llvm/utils/TableGen/DAGISelEmitter.cpp
@@ -742,8 +742,11 @@
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);