aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorStuart Hastings <stuart@apple.com>2011-05-10 21:20:03 +0000
committerStuart Hastings <stuart@apple.com>2011-05-10 21:20:03 +0000
commitd673057c968ee6da2fc9084a26cbd1a500002d2b (patch)
tree537283032432093f270ea2ec168b53ebcba99a7d /lib
parent6253c7ca60e3e5c9b10743721b921aa34307d625 (diff)
downloadexternal_llvm-d673057c968ee6da2fc9084a26cbd1a500002d2b.zip
external_llvm-d673057c968ee6da2fc9084a26cbd1a500002d2b.tar.gz
external_llvm-d673057c968ee6da2fc9084a26cbd1a500002d2b.tar.bz2
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131152 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 2b6c56e..e2e6691 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/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