mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-09 21:50:50 +00:00
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
This commit is contained in:
parent
7c2b7c7c75
commit
4eebb60f84
@ -3377,7 +3377,8 @@ bool SelectionDAGLegalize::ExpandShift(unsigned Opc, SDOperand Op,SDOperand Amt,
|
|||||||
/// Found.
|
/// Found.
|
||||||
static void FindLatestCallSeqStart(SDNode *Node, SDNode *&Found,
|
static void FindLatestCallSeqStart(SDNode *Node, SDNode *&Found,
|
||||||
std::set<SDNode*> &Visited) {
|
std::set<SDNode*> &Visited) {
|
||||||
if (Node->getNodeDepth() <= Found->getNodeDepth() ||
|
if (/*Node->getNodeDepth() <= Found->getNodeDepth() ||*/
|
||||||
|
Node->getNumOperands() == 0 ||
|
||||||
!Visited.insert(Node).second) return;
|
!Visited.insert(Node).second) return;
|
||||||
|
|
||||||
// If we found an CALLSEQ_START, we already know this node occurs later
|
// If we found an CALLSEQ_START, we already know this node occurs later
|
||||||
@ -3404,7 +3405,7 @@ static void FindLatestCallSeqStart(SDNode *Node, SDNode *&Found,
|
|||||||
/// than Found.
|
/// than Found.
|
||||||
static void FindEarliestCallSeqEnd(SDNode *Node, SDNode *&Found,
|
static void FindEarliestCallSeqEnd(SDNode *Node, SDNode *&Found,
|
||||||
std::set<SDNode*> &Visited) {
|
std::set<SDNode*> &Visited) {
|
||||||
if ((Found && Node->getNodeDepth() >= Found->getNodeDepth()) ||
|
if (/*(Found && Node->getNodeDepth() >= Found->getNodeDepth()) ||*/
|
||||||
!Visited.insert(Node).second) return;
|
!Visited.insert(Node).second) return;
|
||||||
|
|
||||||
// If we found an CALLSEQ_END, we already know this node occurs earlier
|
// If we found an CALLSEQ_END, we already know this node occurs earlier
|
||||||
|
@ -490,6 +490,10 @@ void SelectionDAGLowering::visitRet(ReturnInst &I) {
|
|||||||
Op1 = DAG.getNode(ISD::ZERO_EXTEND, TmpVT, Op1);
|
Op1 = DAG.getNode(ISD::ZERO_EXTEND, TmpVT, Op1);
|
||||||
break;
|
break;
|
||||||
case MVT::f32:
|
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::i64:
|
||||||
case MVT::f64:
|
case MVT::f64:
|
||||||
break; // No extension needed!
|
break; // No extension needed!
|
||||||
|
Loading…
Reference in New Issue
Block a user