Also checks for noResults field.
authorEvan Cheng <evan.cheng@apple.com>
Thu, 20 Jul 2006 23:36:20 +0000 (23:36 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 20 Jul 2006 23:36:20 +0000 (23:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29235 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/DAGISelEmitter.cpp

index 9f1913798d823a856478b4401b83f5a687249d34..5f522d3882246b573505ec2bd484b4a2e2d5b777 100644 (file)
@@ -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);