summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorStuart Hastings <stuart@apple.com>2010-12-21 17:07:24 +0000
committerStuart Hastings <stuart@apple.com>2010-12-21 17:07:24 +0000
commit8c5bfcaa29f20e0d1084b48e4fe8c1945e541d54 (patch)
treeb213d017c9f525f2e191df59dc86f9942a11e64d /llvm/lib/CodeGen/SelectionDAG
parenta93adab324659949d6cf832fe87b56a761cc2ff6 (diff)
downloadbcm5719-llvm-8c5bfcaa29f20e0d1084b48e4fe8c1945e541d54.tar.gz
bcm5719-llvm-8c5bfcaa29f20e0d1084b48e4fe8c1945e541d54.zip
Missing logic for nested CALLSEQ_START/END.
llvm-svn: 122342
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 661a7ad6d87..a60b8719372 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -255,8 +255,11 @@ void SelectionDAGLegalize::LegalizeDAG() {
static SDNode *FindCallEndFromCallStart(SDNode *Node, int depth = 0) {
if (Node->getOpcode() == ISD::CALLSEQ_START)
depth++;
- if ((Node->getOpcode() == ISD::CALLSEQ_END) && (depth == 1))
- return Node;
+ else if (Node->getOpcode() == ISD::CALLSEQ_END) {
+ depth--;
+ if (depth == 0)
+ return Node;
+ }
if (Node->use_empty())
return 0; // No CallSeqEnd
OpenPOWER on IntegriCloud