mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
f32 / f64 node is expanded to one i32 / i64 node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32433 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b618230231
commit
bbf1e5e2e9
@ -1547,7 +1547,10 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
|||||||
if (Tmp2.getValueType() != MVT::Vector) {
|
if (Tmp2.getValueType() != MVT::Vector) {
|
||||||
SDOperand Lo, Hi;
|
SDOperand Lo, Hi;
|
||||||
ExpandOp(Tmp2, Lo, Hi);
|
ExpandOp(Tmp2, Lo, Hi);
|
||||||
Result = DAG.getNode(ISD::RET, MVT::Other, Tmp1, Lo, Tmp3, Hi, Tmp3);
|
if (Hi.Val)
|
||||||
|
Result = DAG.getNode(ISD::RET, MVT::Other, Tmp1, Lo, Tmp3, Hi,Tmp3);
|
||||||
|
else
|
||||||
|
Result = DAG.getNode(ISD::RET, MVT::Other, Tmp1, Lo, Tmp3);
|
||||||
Result = LegalizeOp(Result);
|
Result = LegalizeOp(Result);
|
||||||
} else {
|
} else {
|
||||||
SDNode *InVal = Tmp2.Val;
|
SDNode *InVal = Tmp2.Val;
|
||||||
@ -1609,8 +1612,10 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
|||||||
ExpandOp(Node->getOperand(i), Lo, Hi);
|
ExpandOp(Node->getOperand(i), Lo, Hi);
|
||||||
NewValues.push_back(Lo);
|
NewValues.push_back(Lo);
|
||||||
NewValues.push_back(Node->getOperand(i+1));
|
NewValues.push_back(Node->getOperand(i+1));
|
||||||
NewValues.push_back(Hi);
|
if (Hi.Val) {
|
||||||
NewValues.push_back(Node->getOperand(i+1));
|
NewValues.push_back(Hi);
|
||||||
|
NewValues.push_back(Node->getOperand(i+1));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Promote:
|
case Promote:
|
||||||
@ -4570,7 +4575,7 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
|
|||||||
// f32 / f64 must be expanded to i32 / i64.
|
// f32 / f64 must be expanded to i32 / i64.
|
||||||
if (VT == MVT::f32 || VT == MVT::f64) {
|
if (VT == MVT::f32 || VT == MVT::f64) {
|
||||||
Lo = DAG.getNode(ISD::BIT_CONVERT, NVT, Node->getOperand(0));
|
Lo = DAG.getNode(ISD::BIT_CONVERT, NVT, Node->getOperand(0));
|
||||||
Hi = DAG.getConstant(0, NVT);
|
Hi = SDOperand();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4873,7 +4878,9 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
|
|||||||
// is a type that requires multi-step expansion.
|
// is a type that requires multi-step expansion.
|
||||||
if (getTypeAction(NVT) != Expand && NVT != MVT::isVoid) {
|
if (getTypeAction(NVT) != Expand && NVT != MVT::isVoid) {
|
||||||
Lo = LegalizeOp(Lo);
|
Lo = LegalizeOp(Lo);
|
||||||
Hi = LegalizeOp(Hi);
|
if (Hi.Val)
|
||||||
|
// Don't legalize the high part if it is expanded to a single node.
|
||||||
|
Hi = LegalizeOp(Hi);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remember in a map if the values will be reused later.
|
// Remember in a map if the values will be reused later.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user