mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Sink dag combine's post index load / store code that swap base ptr and index into the target hook. Only the target knows whether the swap is safe. In Thumb2 mode, the offset must be an immediate. rdar://7998649
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104060 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -5284,10 +5284,6 @@ bool DAGCombiner::CombineToPostIndexedLoadStore(SDNode *N) {
|
||||
SDValue Offset;
|
||||
ISD::MemIndexedMode AM = ISD::UNINDEXED;
|
||||
if (TLI.getPostIndexedAddressParts(N, Op, BasePtr, Offset, AM, DAG)) {
|
||||
if (Ptr == Offset && Op->getOpcode() == ISD::ADD)
|
||||
std::swap(BasePtr, Offset);
|
||||
if (Ptr != BasePtr)
|
||||
continue;
|
||||
// Don't create a indexed load / store with zero offset.
|
||||
if (isa<ConstantSDNode>(Offset) &&
|
||||
cast<ConstantSDNode>(Offset)->isNullValue())
|
||||
|
Reference in New Issue
Block a user