If the target doesn't support f32 natively, insert the FP_EXTEND in target-indep
code, so that the LowerReturn code doesn't have to handle it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25482 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 2cb6be5..8d5c2d0 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -3377,7 +3377,8 @@
/// Found.
static void FindLatestCallSeqStart(SDNode *Node, SDNode *&Found,
std::set<SDNode*> &Visited) {
- if (Node->getNodeDepth() <= Found->getNodeDepth() ||
+ if (/*Node->getNodeDepth() <= Found->getNodeDepth() ||*/
+ Node->getNumOperands() == 0 ||
!Visited.insert(Node).second) return;
// If we found an CALLSEQ_START, we already know this node occurs later
@@ -3404,7 +3405,7 @@
/// than Found.
static void FindEarliestCallSeqEnd(SDNode *Node, SDNode *&Found,
std::set<SDNode*> &Visited) {
- if ((Found && Node->getNodeDepth() >= Found->getNodeDepth()) ||
+ if (/*(Found && Node->getNodeDepth() >= Found->getNodeDepth()) ||*/
!Visited.insert(Node).second) return;
// If we found an CALLSEQ_END, we already know this node occurs earlier