mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-26 18:20:39 +00:00
Missing logic for nested CALLSEQ_START/END.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122342 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -255,8 +255,11 @@ void SelectionDAGLegalize::LegalizeDAG() {
|
|||||||
static SDNode *FindCallEndFromCallStart(SDNode *Node, int depth = 0) {
|
static SDNode *FindCallEndFromCallStart(SDNode *Node, int depth = 0) {
|
||||||
if (Node->getOpcode() == ISD::CALLSEQ_START)
|
if (Node->getOpcode() == ISD::CALLSEQ_START)
|
||||||
depth++;
|
depth++;
|
||||||
if ((Node->getOpcode() == ISD::CALLSEQ_END) && (depth == 1))
|
else if (Node->getOpcode() == ISD::CALLSEQ_END) {
|
||||||
|
depth--;
|
||||||
|
if (depth == 0)
|
||||||
return Node;
|
return Node;
|
||||||
|
}
|
||||||
if (Node->use_empty())
|
if (Node->use_empty())
|
||||||
return 0; // No CallSeqEnd
|
return 0; // No CallSeqEnd
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user