Let t2LDRBi8 and t2LDRBi12 have same Base Pointer
authorRenato Golin <renato.golin@linaro.org>
Wed, 14 Aug 2013 16:35:29 +0000 (16:35 +0000)
committerRenato Golin <renato.golin@linaro.org>
Wed, 14 Aug 2013 16:35:29 +0000 (16:35 +0000)
commitdd34dc99fdf66edc52b5fc2ddf8132ebaa134aee
tree412710a800e3ece703a4de743cd4e8a893648bb8
parent17a5457ffe009805d58d573b08a75c229e681eaa
Let t2LDRBi8 and t2LDRBi12 have same Base Pointer

When determining if two different loads are from the same base address,
this patch allows one load to use a t2LDRi8 address mode and another to
use a t2LDRi12 address mode. The current implementation is very
conservative and this allows the case of differing Thumb2 byte loads to
be considered. Allowing these differing modes instead of forcing the exact
same opcode is useful for situations where one opcodes loads from a base
address+1 and a second opcode loads for a base address-1.

Patch by Daniel Stewart.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188385 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseInstrInfo.cpp
test/CodeGen/ARM/2013-05-07-ByteLoadSameAddress.ll [new file with mode: 0644]