mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
getPostIndexedAddressParts change: passes in load/store instead of its loaded / stored VT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31584 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a1fd6504aa
commit
d258efaf6e
@ -385,7 +385,7 @@ public:
|
||||
/// getPostIndexedAddressParts - returns true by value, base pointer and
|
||||
/// offset pointer and addressing mode by reference if this node can be
|
||||
/// combined with a load / store to form a post-indexed load / store.
|
||||
virtual bool getPostIndexedAddressParts(SDNode *N, MVT::ValueType VT,
|
||||
virtual bool getPostIndexedAddressParts(SDNode *N, SDNode *Op,
|
||||
SDOperand &Base, SDOperand &Offset,
|
||||
ISD::MemOpAddrMode &AM,
|
||||
SelectionDAG &DAG) {
|
||||
|
@ -282,10 +282,8 @@ namespace {
|
||||
MVT::ValueType VT;
|
||||
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
|
||||
Ptr = LD->getBasePtr();
|
||||
VT = LD->getLoadedVT();
|
||||
} else if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) {
|
||||
Ptr = ST->getBasePtr();
|
||||
VT = ST->getStoredVT();
|
||||
isLoad = false;
|
||||
} else
|
||||
return false;
|
||||
@ -301,7 +299,7 @@ namespace {
|
||||
SDOperand BasePtr;
|
||||
SDOperand Offset;
|
||||
ISD::MemOpAddrMode AM = ISD::UNINDEXED;
|
||||
if (TLI.getPostIndexedAddressParts(Op, VT, BasePtr, Offset, AM,DAG)) {
|
||||
if (TLI.getPostIndexedAddressParts(N, Op, BasePtr, Offset, AM,DAG)) {
|
||||
if (Ptr == Offset)
|
||||
std::swap(BasePtr, Offset);
|
||||
if (Ptr != BasePtr)
|
||||
|
Loading…
Reference in New Issue
Block a user