diff options
author | Stuart Hastings <stuart@apple.com> | 2011-05-10 21:20:03 +0000 |
---|---|---|
committer | Stuart Hastings <stuart@apple.com> | 2011-05-10 21:20:03 +0000 |
commit | 999fa3bf1fc8c684626085e8b8b398c4623550dc (patch) | |
tree | 309a64818d753bb4de9e59d963c848bae0b4798a /llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
parent | 19c1a562876e1842d8c066b96f1417cde18a02e7 (diff) | |
download | bcm5719-llvm-999fa3bf1fc8c684626085e8b8b398c4623550dc.tar.gz bcm5719-llvm-999fa3bf1fc8c684626085e8b8b398c4623550dc.zip |
Correctly walk through nested and adjacent CALLSEQ_START nodes. No
test case; I've only seen this on a release branch, and I can't get it
to reproduce on trunk. rdar://problem/7662569
llvm-svn: 131152
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 2b6c56eafd7..e2e6691ba7c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -324,6 +324,7 @@ static SDNode *FindCallStartFromCallEnd(SDNode *Node) { case ISD::CALLSEQ_START: if (!nested) return Node; + Node = Node->getOperand(0).getNode(); nested--; break; case ISD::CALLSEQ_END: @@ -331,7 +332,7 @@ static SDNode *FindCallStartFromCallEnd(SDNode *Node) { break; } } - return 0; + return (Node->getOpcode() == ISD::CALLSEQ_START) ? Node : 0; } /// LegalizeAllNodesNotLeadingTo - Recursively walk the uses of N, looking to |