[all-commits] [llvm/llvm-project] 008f26: [AArch64] New subtarget features to control ldp an...
Manos Anagnostakis via All-commits
all-commits at lists.llvm.org
Thu Sep 14 07:58:53 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 008f26b12e348a07228d7c61304bb22f13a1e7fb
https://github.com/llvm/llvm-project/commit/008f26b12e348a07228d7c61304bb22f13a1e7fb
Author: Manos Anagnostakis <manos.anagnostakis at vrull.eu>
Date: 2023-09-14 (Thu, 14 Sep 2023)
Changed paths:
M llvm/lib/Target/AArch64/AArch64.td
M llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
A llvm/test/CodeGen/AArch64/ldp-stp-control-features.ll
Log Message:
-----------
[AArch64] New subtarget features to control ldp and stp formation (#66098)
On some AArch64 cores, including Ampere's ampere1 and ampere1a
architectures, load and store pair instructions are faster compared to
simple loads/stores only when the alignment of the pair is at least
twice that of the individual element being loaded.
Based on that, this patch introduces four new subtarget features, two
for controlling ldp and two for controlling stp, to cover the ampere1
and ampere1a alignment needs and to enable optional fine-grained control
over ldp and stp generation in general. The latter can be utilized by
another cpu, if there are possible benefits
with a different policy than the default provided by the compiler.
More specifically, for each of the ldp and stp respectively we have:
- disable-ldp/disable-stp: Do not emit ldp/stp.
- ldp-aligned-only/stp-aligned-only: Emit ldp/stp only if the source
pointer is aligned to at least double the alignment of the type.
Therefore, for -mcpu=ampere1 and -mcpu=ampere1a
ldp-aligned-only/stp-aligned-only become the defaults, because of the
benefit from the alignment, whereas for the rest of the cpus the default
behaviour of the compiler is maintained.
More information about the All-commits
mailing list