[FastISel][AArch64] Try to fold the offset into the add instruction when simplifying...
authorJuergen Ributzka <juergen@apple.com>
Thu, 18 Sep 2014 05:40:47 +0000 (05:40 +0000)
committerJuergen Ributzka <juergen@apple.com>
Thu, 18 Sep 2014 05:40:47 +0000 (05:40 +0000)
commit22b557d94277947d88029ed20a89381842ec22b9
tree1ec27b8b341bd9aebcee2c4fab38de1786571876
parentffbd4879ebb8c0075500be281937586206a727dc
[FastISel][AArch64] Try to fold the offset into the add instruction when simplifying a memory address.

Small optimization in 'simplifyAddress'. When the offset cannot be encoded in
the load/store instruction, then we need to materialize the address manually.
The add instruction can encode a wider range of immediates than the load/store
instructions. This change tries to fold the offset into the add instruction
first before materializing the offset in a register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218031 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64FastISel.cpp
test/CodeGen/AArch64/fast-isel-addressing-modes.ll