summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2015-06-29 21:42:16 +0000
committerTim Northover <tnorthover@apple.com>2015-06-29 21:42:16 +0000
commit83f0fbcc3712b185dc2323f8ee6e2a9527f97a04 (patch)
tree5299bbf5ceee928f7b0c1dbee252ab98719c7157 /llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
parentabf88a0398d60bbf26d462dd84b9252c9098dc5a (diff)
downloadbcm5719-llvm-83f0fbcc3712b185dc2323f8ee6e2a9527f97a04.tar.gz
bcm5719-llvm-83f0fbcc3712b185dc2323f8ee6e2a9527f97a04.zip
ARM: add correct kill flags when combining stm instructions
When the store sequence being combined actually stores the base register, we should not mark it as killed until the end. rdar://21504262 llvm-svn: 241003
Diffstat (limited to 'llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
index 33ca20a3e3e..245c9e869bf 100644
--- a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
+++ b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
@@ -743,6 +743,12 @@ void ARMLoadStoreOpt::MergeOpsUpdate(MachineBasicBlock &MBB,
}
}
+ for (unsigned i = memOpsBegin; i < memOpsEnd; ++i) {
+ MachineOperand &TransferOp = memOps[i].MBBI->getOperand(0);
+ if (TransferOp.isUse() && TransferOp.getReg() == Base)
+ BaseKill = false;
+ }
+
SmallVector<std::pair<unsigned, bool>, 8> Regs;
SmallVector<unsigned, 8> ImpDefs;
SmallVector<MachineOperand *, 8> UsesOfImpDefs;
OpenPOWER on IntegriCloud