OSDN Git Service

[AArch64] Fix halfword load merging for big-endian targets
authorOliver Stannard <oliver.stannard@arm.com>
Tue, 10 Nov 2015 11:04:18 +0000 (11:04 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Tue, 10 Nov 2015 11:04:18 +0000 (11:04 +0000)
commit2358986dd4ecf9dd9743b808d9a23749897353cd
tree6031d314004ad56eb26b5af0c202f54dfe167af3
parentbe73ba8c825816888abf1919a63afee218a63bbf
[AArch64] Fix halfword load merging for big-endian targets

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.

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