[Thumb-1] Select post-increment load and store where possible
commitcf85ddcdf1b195d06ccbd0f38988cc4b2df766c7
authorJames Molloy <james.molloy@arm.com>
Fri, 15 Jul 2016 08:03:56 +0000 (15 08:03 +0000)
committerJames Molloy <james.molloy@arm.com>
Fri, 15 Jul 2016 08:03:56 +0000 (15 08:03 +0000)
tree9fdfac462096623441e11f34fa107be1017be3cb
parentc30ebec2df5576f6f9b728b4584708f82a6f3184
[Thumb-1] Select post-increment load and store where possible

Thumb-1 doesn't have post-inc or pre-inc load or store instructions. However the LDM/STM instructions with writeback can function as post-inc load/store:

  ldm r0!, {r1}  @ load from r0 into r1 and increment r0 by 4

Obviously, this only works if the post increment is 4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275540 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelDAGToDAG.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMInstrThumb.td
test/CodeGen/Thumb/ldm-stm-postinc.ll [new file with mode: 0644]