aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-05-14 08:34:53 +0000
committerChris Lattner <sabre@nondot.org>2005-05-14 08:34:53 +0000
commit2789bde57f4245f4418a2d8d54e7f372b71f0a7d (patch)
tree4c831cf19ddc6636c8c4a18290bbdc7200f980da /lib/CodeGen
parent3e01136f9fc2e1db9207d278002e76e6175783e9 (diff)
allow token chain at start or end of node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22020 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index e611557716..f1fd69eca8 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -2044,6 +2044,8 @@ static SDNode *FindCallSeqEnd(SDNode *Node) {
return FindCallSeqEnd(*Node->use_begin());
SDOperand TheChain(Node, Node->getNumValues()-1);
+ if (TheChain.getValueType() != MVT::Other)
+ TheChain = SDOperand(Node, 0);
assert(TheChain.getValueType() == MVT::Other && "Is not a token chain!");
for (SDNode::use_iterator UI = Node->use_begin(),