mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 18:37:17 +00:00
Thumb2 does not have ib (increment before) and da (decrement after) forms of ldm / stm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78057 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d5ac40457b
commit
eb084d1671
@ -176,13 +176,19 @@ ARMLoadStoreOpt::MergeOps(MachineBasicBlock &MBB,
|
||||
|
||||
ARM_AM::AMSubMode Mode = ARM_AM::ia;
|
||||
bool isAM4 = isi32Load(Opcode) || isi32Store(Opcode);
|
||||
if (isAM4 && Offset == 4)
|
||||
if (isAM4 && Offset == 4) {
|
||||
if (isThumb2)
|
||||
// Thumb2 does not support ldmib / stmib.
|
||||
return false;
|
||||
Mode = ARM_AM::ib;
|
||||
else if (isAM4 && Offset == -4 * (int)NumRegs + 4)
|
||||
} else if (isAM4 && Offset == -4 * (int)NumRegs + 4) {
|
||||
if (isThumb2)
|
||||
// Thumb2 does not support ldmda / stmda.
|
||||
return false;
|
||||
Mode = ARM_AM::da;
|
||||
else if (isAM4 && Offset == -4 * (int)NumRegs)
|
||||
} else if (isAM4 && Offset == -4 * (int)NumRegs) {
|
||||
Mode = ARM_AM::db;
|
||||
else if (Offset != 0) {
|
||||
} else if (Offset != 0) {
|
||||
// If starting offset isn't zero, insert a MI to materialize a new base.
|
||||
// But only do so if it is cost effective, i.e. merging more than two
|
||||
// loads / stores.
|
||||
|
Loading…
Reference in New Issue
Block a user