mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 06:25:18 +00:00
Misc cleanup; addresses Duncan's comments on r138877.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138887 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -110,9 +110,7 @@ SDValue DAGTypeLegalizer::SoftenFloatRes_BITCAST(SDNode *N) {
|
|||||||
|
|
||||||
SDValue DAGTypeLegalizer::SoftenFloatRes_MERGE_VALUES(SDNode *N) {
|
SDValue DAGTypeLegalizer::SoftenFloatRes_MERGE_VALUES(SDNode *N) {
|
||||||
SDValue Op = DecomposeMERGE_VALUES(N);
|
SDValue Op = DecomposeMERGE_VALUES(N);
|
||||||
return Op.getValueType().isVector() ?
|
return BitConvertToInteger(Op);
|
||||||
BitConvertVectorToIntegerVector(Op) :
|
|
||||||
BitConvertToInteger(Op);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SDValue DAGTypeLegalizer::SoftenFloatRes_BUILD_PAIR(SDNode *N) {
|
SDValue DAGTypeLegalizer::SoftenFloatRes_BUILD_PAIR(SDNode *N) {
|
||||||
|
@@ -139,8 +139,6 @@ void DAGTypeLegalizer::PromoteIntegerResult(SDNode *N, unsigned ResNo) {
|
|||||||
|
|
||||||
SDValue DAGTypeLegalizer::PromoteIntRes_MERGE_VALUES(SDNode *N) {
|
SDValue DAGTypeLegalizer::PromoteIntRes_MERGE_VALUES(SDNode *N) {
|
||||||
SDValue Op = DecomposeMERGE_VALUES(N);
|
SDValue Op = DecomposeMERGE_VALUES(N);
|
||||||
assert(Op.getValueType().isInteger()
|
|
||||||
&& "Must decompose to an integer type!");
|
|
||||||
return GetPromotedInteger(Op);
|
return GetPromotedInteger(Op);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1556,11 +1554,10 @@ void DAGTypeLegalizer::ExpandIntRes_ADDSUBE(SDNode *N,
|
|||||||
// use the new one.
|
// use the new one.
|
||||||
ReplaceValueWith(SDValue(N, 1), Hi.getValue(1));
|
ReplaceValueWith(SDValue(N, 1), Hi.getValue(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DAGTypeLegalizer::ExpandIntRes_MERGE_VALUES(SDNode *N,
|
void DAGTypeLegalizer::ExpandIntRes_MERGE_VALUES(SDNode *N,
|
||||||
SDValue &Lo, SDValue &Hi) {
|
SDValue &Lo, SDValue &Hi) {
|
||||||
SDValue Res = DecomposeMERGE_VALUES(N);
|
SDValue Res = DecomposeMERGE_VALUES(N);
|
||||||
assert(Res.getValueType().isInteger()
|
|
||||||
&& "Cannot split a non-integer value.");
|
|
||||||
SplitInteger(Res, Lo, Hi);
|
SplitInteger(Res, Lo, Hi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -949,20 +949,21 @@ bool DAGTypeLegalizer::CustomWidenLowerNode(SDNode *N, EVT VT) {
|
|||||||
SDValue DAGTypeLegalizer::DecomposeMERGE_VALUES(SDNode *N) {
|
SDValue DAGTypeLegalizer::DecomposeMERGE_VALUES(SDNode *N) {
|
||||||
unsigned i;
|
unsigned i;
|
||||||
// A MERGE_VALUES node can produce any number of values.
|
// A MERGE_VALUES node can produce any number of values.
|
||||||
// We know that the first illegal type needs to be handled.
|
// Replace the results other than the first illegal one with the
|
||||||
|
// corresponding input operands.
|
||||||
for (i = 0; isTypeLegal(N->getValueType(i)); ++i)
|
for (i = 0; isTypeLegal(N->getValueType(i)); ++i)
|
||||||
ReplaceValueWith(SDValue(N, i), SDValue(N->getOperand(i)));
|
ReplaceValueWith(SDValue(N, i), SDValue(N->getOperand(i)));
|
||||||
|
|
||||||
// The first illegal result must be the one that needs to be handled.
|
// The first illegal result is the one which needs to be handled;
|
||||||
SDValue BadValue = N->getOperand(i);
|
// type legalization legalizes values in order.
|
||||||
|
SDValue IllegalValue = N->getOperand(i);
|
||||||
|
|
||||||
// Legalize the rest of the results into the input operands whether they
|
// Continue replacing results.
|
||||||
// are legal or not.
|
|
||||||
unsigned e = N->getNumValues();
|
unsigned e = N->getNumValues();
|
||||||
for (++i; i != e; ++i)
|
for (++i; i != e; ++i)
|
||||||
ReplaceValueWith(SDValue(N, i), SDValue(N->getOperand(i)));
|
ReplaceValueWith(SDValue(N, i), SDValue(N->getOperand(i)));
|
||||||
|
|
||||||
return BadValue;
|
return IllegalValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// GetSplitDestVTs - Compute the VTs needed for the low/hi parts of a type
|
/// GetSplitDestVTs - Compute the VTs needed for the low/hi parts of a type
|
||||||
|
@@ -150,9 +150,8 @@ private:
|
|||||||
bool CustomWidenLowerNode(SDNode *N, EVT VT);
|
bool CustomWidenLowerNode(SDNode *N, EVT VT);
|
||||||
|
|
||||||
// DecomposeMERGE_VALUES takes a SDNode and returns the first
|
// DecomposeMERGE_VALUES takes a SDNode and returns the first
|
||||||
// illegal operand that needs to be modified.
|
// illegal value. All other results are replaced with the
|
||||||
// All other nodes are legalized, whether they are legal or not.
|
// corresponding input operand.
|
||||||
// The resulting SDValue needs to be modified to make it legal.
|
|
||||||
SDValue DecomposeMERGE_VALUES(SDNode *N);
|
SDValue DecomposeMERGE_VALUES(SDNode *N);
|
||||||
|
|
||||||
SDValue GetVectorElementPointer(SDValue VecPtr, EVT EltVT, SDValue Index);
|
SDValue GetVectorElementPointer(SDValue VecPtr, EVT EltVT, SDValue Index);
|
||||||
|
Reference in New Issue
Block a user