ARMLoadStoreOpt: Merge subs/adds into LDRD/STRD; Factor out common code
authorMatthias Braun <matze@braunis.de>
Tue, 21 Jul 2015 00:19:01 +0000 (00:19 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 21 Jul 2015 00:19:01 +0000 (00:19 +0000)
commit573a81b6bfc27e00014cbdae52951bf7ecb4797a
treeefb638ca6465db2c5d6f960c6d6bfb93db7e6bd9
parent361054b1fa1c823f227bf58ad0c22f9c96e0822c
ARMLoadStoreOpt: Merge subs/adds into LDRD/STRD; Factor out common code

Re-apply of r241928 which had to be reverted because of the r241926
revert.

This commit factors out common code from MergeBaseUpdateLoadStore() and
MergeBaseUpdateLSMultiple() and introduces a new function
MergeBaseUpdateLSDouble() which merges adds/subs preceding/following a
strd/ldrd instruction into an strd/ldrd instruction with writeback where
possible.

Differential Revision: http://reviews.llvm.org/D10676

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242743 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMLoadStoreOptimizer.cpp
test/CodeGen/ARM/ldrd.ll