diff options
| author | Eli Friedman <efriedma@codeaurora.org> | 2016-08-12 20:39:51 +0000 |
|---|---|---|
| committer | Eli Friedman <efriedma@codeaurora.org> | 2016-08-12 20:39:51 +0000 |
| commit | f184e4befcf0df386baf71820b6f13b8250556ed (patch) | |
| tree | b3b55179585f68d6aaa1a321b84312db48b61e32 /llvm/lib | |
| parent | 8f66df92ba28f7db8c63bee46780b825750ad8d7 (diff) | |
| download | bcm5719-llvm-f184e4befcf0df386baf71820b6f13b8250556ed.tar.gz bcm5719-llvm-f184e4befcf0df386baf71820b6f13b8250556ed.zip | |
[AArch64LoadStoreOptimizer] Check aliasing correctly when creating paired loads/stores.
The existing code accidentally skipped the aliasing check in edge cases.
Differential revision: https://reviews.llvm.org/D23372
llvm-svn: 278562
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp index a2e0376c50b..dc07af6f5ad 100644 --- a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp +++ b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp @@ -1253,8 +1253,11 @@ AArch64LoadStoreOpt::findMatchingInsn(MachineBasicBlock::iterator I, if (MIIsUnscaled) { // If the unscaled offset isn't a multiple of the MemSize, we can't // pair the operations together: bail and keep looking. - if (MIOffset % MemSize) + if (MIOffset % MemSize) { + trackRegDefsUses(MI, ModifiedRegs, UsedRegs, TRI); + MemInsns.push_back(&MI); continue; + } MIOffset /= MemSize; } else { MIOffset *= MemSize; |

