mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-18 10:24:45 +00:00
continue MachinePointerInfo'izing, eliminating use of one of the old
getLoad overloads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114443 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -705,8 +705,8 @@ void DAGTypeLegalizer::SplitVecRes_INSERT_VECTOR_ELT(SDNode *N, SDValue &Lo,
|
||||
EVT VecVT = Vec.getValueType();
|
||||
EVT EltVT = VecVT.getVectorElementType();
|
||||
SDValue StackPtr = DAG.CreateStackTemporary(VecVT);
|
||||
SDValue Store = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr, NULL, 0,
|
||||
false, false, 0);
|
||||
SDValue Store = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr,
|
||||
MachinePointerInfo(), false, false, 0);
|
||||
|
||||
// Store the new element. This may be larger than the vector element type,
|
||||
// so use a truncating store.
|
||||
@@ -714,11 +714,11 @@ void DAGTypeLegalizer::SplitVecRes_INSERT_VECTOR_ELT(SDNode *N, SDValue &Lo,
|
||||
const Type *VecType = VecVT.getTypeForEVT(*DAG.getContext());
|
||||
unsigned Alignment =
|
||||
TLI.getTargetData()->getPrefTypeAlignment(VecType);
|
||||
Store = DAG.getTruncStore(Store, dl, Elt, EltPtr, NULL, 0, EltVT,
|
||||
Store = DAG.getTruncStore(Store, dl, Elt, EltPtr, MachinePointerInfo(), EltVT,
|
||||
false, false, 0);
|
||||
|
||||
// Load the Lo part from the stack slot.
|
||||
Lo = DAG.getLoad(Lo.getValueType(), dl, Store, StackPtr, NULL, 0,
|
||||
Lo = DAG.getLoad(Lo.getValueType(), dl, Store, StackPtr, MachinePointerInfo(),
|
||||
false, false, 0);
|
||||
|
||||
// Increment the pointer to the other part.
|
||||
@@ -727,8 +727,8 @@ void DAGTypeLegalizer::SplitVecRes_INSERT_VECTOR_ELT(SDNode *N, SDValue &Lo,
|
||||
DAG.getIntPtrConstant(IncrementSize));
|
||||
|
||||
// Load the Hi part from the stack slot.
|
||||
Hi = DAG.getLoad(Hi.getValueType(), dl, Store, StackPtr, NULL, 0, false,
|
||||
false, MinAlign(Alignment, IncrementSize));
|
||||
Hi = DAG.getLoad(Hi.getValueType(), dl, Store, StackPtr, MachinePointerInfo(),
|
||||
false, false, MinAlign(Alignment, IncrementSize));
|
||||
}
|
||||
|
||||
void DAGTypeLegalizer::SplitVecRes_SCALAR_TO_VECTOR(SDNode *N, SDValue &Lo,
|
||||
@@ -2212,8 +2212,8 @@ static SDValue BuildVectorFromScalar(SelectionDAG& DAG, EVT VecTy,
|
||||
return DAG.getNode(ISD::BIT_CONVERT, dl, VecTy, VecOp);
|
||||
}
|
||||
|
||||
SDValue DAGTypeLegalizer::GenWidenVectorLoads(SmallVector<SDValue, 16>& LdChain,
|
||||
LoadSDNode * LD) {
|
||||
SDValue DAGTypeLegalizer::GenWidenVectorLoads(SmallVector<SDValue, 16> &LdChain,
|
||||
LoadSDNode *LD) {
|
||||
// The strategy assumes that we can efficiently load powers of two widths.
|
||||
// The routines chops the vector into the largest vector loads with the same
|
||||
// element type or scalar loads and then recombines it to the widen vector
|
||||
@@ -2228,11 +2228,9 @@ SDValue DAGTypeLegalizer::GenWidenVectorLoads(SmallVector<SDValue, 16>& LdChain,
|
||||
// Load information
|
||||
SDValue Chain = LD->getChain();
|
||||
SDValue BasePtr = LD->getBasePtr();
|
||||
int SVOffset = LD->getSrcValueOffset();
|
||||
unsigned Align = LD->getAlignment();
|
||||
bool isVolatile = LD->isVolatile();
|
||||
bool isNonTemporal = LD->isNonTemporal();
|
||||
const Value *SV = LD->getSrcValue();
|
||||
|
||||
int LdWidth = LdVT.getSizeInBits();
|
||||
int WidthDiff = WidenWidth - LdWidth; // Difference
|
||||
@@ -2241,7 +2239,7 @@ SDValue DAGTypeLegalizer::GenWidenVectorLoads(SmallVector<SDValue, 16>& LdChain,
|
||||
// Find the vector type that can load from.
|
||||
EVT NewVT = FindMemType(DAG, TLI, LdWidth, WidenVT, LdAlign, WidthDiff);
|
||||
int NewVTWidth = NewVT.getSizeInBits();
|
||||
SDValue LdOp = DAG.getLoad(NewVT, dl, Chain, BasePtr, SV, SVOffset,
|
||||
SDValue LdOp = DAG.getLoad(NewVT, dl, Chain, BasePtr, LD->getPointerInfo(),
|
||||
isVolatile, isNonTemporal, Align);
|
||||
LdChain.push_back(LdOp.getValue(1));
|
||||
|
||||
@@ -2286,8 +2284,9 @@ SDValue DAGTypeLegalizer::GenWidenVectorLoads(SmallVector<SDValue, 16>& LdChain,
|
||||
NewVTWidth = NewVT.getSizeInBits();
|
||||
}
|
||||
|
||||
SDValue LdOp = DAG.getLoad(NewVT, dl, Chain, BasePtr, SV,
|
||||
SVOffset+Offset, isVolatile,
|
||||
SDValue LdOp = DAG.getLoad(NewVT, dl, Chain, BasePtr,
|
||||
LD->getPointerInfo().getWithOffset(Offset),
|
||||
isVolatile,
|
||||
isNonTemporal, MinAlign(Align, Increment));
|
||||
LdChain.push_back(LdOp.getValue(1));
|
||||
LdOps.push_back(LdOp);
|
||||
|
Reference in New Issue
Block a user