diff options
author | Eric Christopher <echristo@apple.com> | 2010-03-19 23:04:23 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-03-19 23:04:23 +0000 |
commit | d7de54068ca6db50f4b54fb150af7b7c62573449 (patch) | |
tree | 688054401efe6c6ed8adc71b6d06221a536c7291 /utils/TableGen/CodeGenDAGPatterns.cpp | |
parent | 76a312b7d1c2b41394696510506967cd0794b831 (diff) |
Revert r99009 temporarily it seems to be breaking the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r-- | utils/TableGen/CodeGenDAGPatterns.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp index 710b2ab061..00b6fe2200 100644 --- a/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/utils/TableGen/CodeGenDAGPatterns.cpp @@ -754,8 +754,12 @@ static unsigned GetNumNodeResults(Record *Operator, CodeGenDAGPatterns &CDP) { Operator->getName() == "parallel") return 0; // All return nothing. - if (Operator->isSubClassOf("Intrinsic")) - return CDP.getIntrinsic(Operator).IS.RetVTs.size(); + if (Operator->isSubClassOf("Intrinsic")) { + unsigned NumRes = CDP.getIntrinsic(Operator).IS.RetVTs.size(); + if (NumRes == 1 && CDP.getIntrinsic(Operator).IS.RetVTs[0] == MVT::isVoid) + return 0; + return NumRes; + } if (Operator->isSubClassOf("SDNode")) return CDP.getSDNodeInfo(Operator).getNumResults(); @@ -1206,6 +1210,8 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) { // Apply the result type to the node. unsigned NumRetVTs = Int->IS.RetVTs.size(); unsigned NumParamVTs = Int->IS.ParamVTs.size(); + if (NumRetVTs == 1 && Int->IS.RetVTs[0] == MVT::isVoid) + NumRetVTs = 0; for (unsigned i = 0, e = NumRetVTs; i != e; ++i) MadeChange |= UpdateNodeType(i, Int->IS.RetVTs[i], TP); @@ -1585,7 +1591,7 @@ TreePatternNode *TreePattern::ParseTreePattern(DagInit *Dag) { // If this intrinsic returns void, it must have side-effects and thus a // chain. - if (Int.IS.RetVTs.empty()) { + if (Int.IS.RetVTs[0] == MVT::isVoid) { Operator = getDAGPatterns().get_intrinsic_void_sdnode(); } else if (Int.ModRef != CodeGenIntrinsic::NoMem) { // Has side-effects, requires chain. |