summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit3268f244e675f803ff5eadee5dcac59cbb9a1208 (patch)
tree27f6341db0c8d502da52e0368d4239230b4fd75f /llvm/lib/CodeGen
parent865359958bc5ebf34297877bcd8e8ee7fc98348a (diff)
downloadbcm5719-llvm-3268f244e675f803ff5eadee5dcac59cbb9a1208.tar.gz
bcm5719-llvm-3268f244e675f803ff5eadee5dcac59cbb9a1208.zip
allow token chain at start or end of node
llvm-svn: 22020
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index e611557716d..f1fd69eca85 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/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(),
OpenPOWER on IntegriCloud