/// 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
/// 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
Op1 = DAG.getNode(ISD::ZERO_EXTEND, TmpVT, Op1);
break;
case MVT::f32:
+ // If this is a machine where f32 is promoted to f64, do so now.
+ if (TLI.getTypeAction(MVT::f32) == TargetLowering::Promote)
+ Op1 = DAG.getNode(ISD::FP_EXTEND, TLI.getTypeToTransformTo(MVT::f32),Op1);
+ break;
case MVT::i64:
case MVT::f64:
break; // No extension needed!