mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-21 01:25:20 +00:00
Make use of TLI.ExpandOperation, remove softfloat stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c224a53d7a
commit
597ab48ca0
@ -725,19 +725,6 @@ void DAGTypeLegalizer::ExpandResult_LOAD(LoadSDNode *N,
|
|||||||
if (ExtType == ISD::NON_EXTLOAD) {
|
if (ExtType == ISD::NON_EXTLOAD) {
|
||||||
Lo = DAG.getLoad(NVT, Ch, Ptr, N->getSrcValue(), SVOffset,
|
Lo = DAG.getLoad(NVT, Ch, Ptr, N->getSrcValue(), SVOffset,
|
||||||
isVolatile, Alignment);
|
isVolatile, Alignment);
|
||||||
if (VT == MVT::f32 || VT == MVT::f64) {
|
|
||||||
assert(0 && "FIXME: softfp should use promotion!");
|
|
||||||
#if 0
|
|
||||||
// f32->i32 or f64->i64 one to one expansion.
|
|
||||||
// Remember that we legalized the chain.
|
|
||||||
AddLegalizedOperand(SDOperand(Node, 1), LegalizeOp(Lo.getValue(1)));
|
|
||||||
// Recursively expand the new load.
|
|
||||||
if (getTypeAction(NVT) == Expand)
|
|
||||||
ExpandOp(Lo, Lo, Hi);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// Increment the pointer to the other half.
|
// Increment the pointer to the other half.
|
||||||
unsigned IncrementSize = MVT::getSizeInBits(Lo.getValueType())/8;
|
unsigned IncrementSize = MVT::getSizeInBits(Lo.getValueType())/8;
|
||||||
Ptr = DAG.getNode(ISD::ADD, Ptr.getValueType(), Ptr,
|
Ptr = DAG.getNode(ISD::ADD, Ptr.getValueType(), Ptr,
|
||||||
@ -756,19 +743,6 @@ void DAGTypeLegalizer::ExpandResult_LOAD(LoadSDNode *N,
|
|||||||
} else {
|
} else {
|
||||||
MVT::ValueType EVT = N->getLoadedVT();
|
MVT::ValueType EVT = N->getLoadedVT();
|
||||||
|
|
||||||
if (VT == MVT::f64 && EVT == MVT::f32) {
|
|
||||||
assert(0 && "FIXME: softfp should use promotion!");
|
|
||||||
#if 0
|
|
||||||
// f64 = EXTLOAD f32 should expand to LOAD, FP_EXTEND
|
|
||||||
SDOperand Load = DAG.getLoad(EVT, Ch, Ptr, N->getSrcValue(),
|
|
||||||
SVOffset, isVolatile, Alignment);
|
|
||||||
// Remember that we legalized the chain.
|
|
||||||
AddLegalizedOperand(SDOperand(Node, 1), LegalizeOp(Load.getValue(1)));
|
|
||||||
ExpandOp(DAG.getNode(ISD::FP_EXTEND, VT, Load), Lo, Hi);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
if (EVT == NVT)
|
if (EVT == NVT)
|
||||||
Lo = DAG.getLoad(NVT, Ch, Ptr, N->getSrcValue(),
|
Lo = DAG.getLoad(NVT, Ch, Ptr, N->getSrcValue(),
|
||||||
SVOffset, isVolatile, Alignment);
|
SVOffset, isVolatile, Alignment);
|
||||||
@ -843,13 +817,11 @@ void DAGTypeLegalizer::ExpandResult_ADDSUB(SDNode *N,
|
|||||||
// If the target wants to custom expand this, let them.
|
// If the target wants to custom expand this, let them.
|
||||||
if (TLI.getOperationAction(N->getOpcode(), VT) ==
|
if (TLI.getOperationAction(N->getOpcode(), VT) ==
|
||||||
TargetLowering::Custom) {
|
TargetLowering::Custom) {
|
||||||
SDOperand Op = TLI.LowerOperation(SDOperand(N, 0), DAG);
|
std::pair<SDOperand,SDOperand> Ret =
|
||||||
// FIXME: Do a replace all uses with here!
|
TLI.ExpandOperation(SDOperand(N, 0), DAG);
|
||||||
assert(0 && "Custom not impl yet!");
|
if (Ret.first.Val) {
|
||||||
if (Op.Val) {
|
Lo = Ret.first;
|
||||||
#if 0
|
Hi = Ret.second;
|
||||||
ExpandOp(Op, Lo, Hi);
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -905,13 +877,11 @@ void DAGTypeLegalizer::ExpandResult_MUL(SDNode *N,
|
|||||||
|
|
||||||
// If the target wants to custom expand this, let them.
|
// If the target wants to custom expand this, let them.
|
||||||
if (TLI.getOperationAction(ISD::MUL, VT) == TargetLowering::Custom) {
|
if (TLI.getOperationAction(ISD::MUL, VT) == TargetLowering::Custom) {
|
||||||
SDOperand New = TLI.LowerOperation(SDOperand(N, 0), DAG);
|
std::pair<SDOperand,SDOperand> Ret =
|
||||||
if (New.Val) {
|
TLI.ExpandOperation(SDOperand(N, 0), DAG);
|
||||||
// FIXME: Do a replace all uses with here!
|
if (Ret.first.Val) {
|
||||||
assert(0 && "Custom not impl yet!");
|
Lo = Ret.first;
|
||||||
#if 0
|
Hi = Ret.second;
|
||||||
ExpandOp(New, Lo, Hi);
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -990,15 +960,11 @@ void DAGTypeLegalizer::ExpandResult_Shift(SDNode *N,
|
|||||||
|
|
||||||
// If the target wants custom lowering, do so.
|
// If the target wants custom lowering, do so.
|
||||||
if (TLI.getOperationAction(N->getOpcode(), VT) == TargetLowering::Custom) {
|
if (TLI.getOperationAction(N->getOpcode(), VT) == TargetLowering::Custom) {
|
||||||
SDOperand Op = TLI.LowerOperation(SDOperand(N, 0), DAG);
|
std::pair<SDOperand,SDOperand> Ret =
|
||||||
if (Op.Val) {
|
TLI.ExpandOperation(SDOperand(N, 0), DAG);
|
||||||
// Now that the custom expander is done, expand the result, which is
|
if (Ret.first.Val) {
|
||||||
// still VT.
|
Lo = Ret.first;
|
||||||
// FIXME: Do a replace all uses with here!
|
Hi = Ret.second;
|
||||||
abort();
|
|
||||||
#if 0
|
|
||||||
ExpandOp(Op, Lo, Hi);
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user