[AArch64]Extend merging narrow loads into a wider load
authorJun Bum Lim <junbuml@codeaurora.org>
Thu, 19 Nov 2015 17:21:41 +0000 (17:21 +0000)
committerJun Bum Lim <junbuml@codeaurora.org>
Thu, 19 Nov 2015 17:21:41 +0000 (17:21 +0000)
commit575b88edcbf673417d8a8d7980808b31b4fef898
tree9394feebbad1acfec9e5f8d9347a3b8fc3378a75
parent02857f7b46cfe7a1fef5d358f8d788739feb6adf
[AArch64]Extend merging narrow loads into a wider load

This change extends r251438 to handle more narrow load promotions
including byte type, unscaled, and signed. For example, this change will
convert :
  ldursh w1, [x0, #-2]
  ldurh  w2, [x0, #-4]
into
  ldur  w2, [x0, #-4]
  asr   w1, w2, #16
  and   w2, w2, #0xffff

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253577 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
test/CodeGen/AArch64/arm64-ldr-merge.ll