[AArch64] Promote loads from stores
authorJun Bum Lim <junbuml@codeaurora.org>
Fri, 18 Dec 2015 18:08:30 +0000 (18:08 +0000)
committerJun Bum Lim <junbuml@codeaurora.org>
Fri, 18 Dec 2015 18:08:30 +0000 (18:08 +0000)
commitcb2bad780bcdbe5a373237b71b31c92aa2736cf3
tree7761eb8225b83f9600b322d6f7bbf97386d265ca
parente8df234a6ea0dbc20e4da677f2f9f8c426f44246
[AArch64] Promote loads from stores

This change promotes load instructions which directly read from stores by
replacing them with mov instructions. If the store is wider than the load,
the load will be replaced with a bitfield extract.
For example :
  STRWui %W1, %X0, 1
  %W0 = LDRHHui %X0, 3
becomes
  STRWui %W1, %X0, 1
  %W0 = UBFMWri %W1, 16, 31

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256004 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
test/CodeGen/AArch64/arm64-alloca-frame-pointer-offset.ll
test/CodeGen/AArch64/arm64-ld-from-st.ll [new file with mode: 0644]
test/CodeGen/AArch64/regress-tblgen-chains.ll