[PATCH] D14534: [AArch64] Fix halfword load merging for big-endian targets

Oliver Stannard via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 02:36:19 PST 2015


olista01 created this revision.
olista01 added reviewers: junbuml, mcrosier.
olista01 added a subscriber: llvm-commits.
olista01 set the repository for this revision to rL LLVM.
Herald added subscribers: rengolin, aemerson.

For big-endian targets, when we merge two halfword loads into a word load, the order of the halfwords in the loaded value is reversed compared to little-endian, so the load-store optimiser needs to swap the destination registers.

This does not affect merging of two word loads, as we use ldp, which treats the memory as two separate 32-bit words.

Repository:
  rL LLVM

http://reviews.llvm.org/D14534

Files:
  lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
  test/CodeGen/AArch64/arm64-ldr-merge.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14534.39798.patch
Type: text/x-patch
Size: 5036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151110/9949881a/attachment.bin>


More information about the llvm-commits mailing list