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)
commita50d2203fa4f7d886ba943b267222599bbce5dda
tree41f4a10368e0842d5f530492499a5f863241c89e
parente40d89ef9bd6fac06a8087e92351f5725b5ba1d6
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

llvm-svn: 242743
llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
llvm/test/CodeGen/ARM/ldrd.ll