]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Add support for Ampere-1A (-mcpu=ampere1a) CPU
authorPhilipp Tomsich <philipp.tomsich@vrull.eu>
Mon, 7 Nov 2022 13:22:21 +0000 (14:22 +0100)
committerPhilipp Tomsich <philipp.tomsich@vrull.eu>
Wed, 16 Nov 2022 22:46:19 +0000 (23:46 +0100)
commite9f0d974600ed3c1892d1fb2711142cf734f9481
treee2d46e8a16afb54cb73506962e9b42eb5297b243
parent985a8962712a56d1c9418cf05e1761f8bd20cf8f
aarch64: Add support for Ampere-1A (-mcpu=ampere1a) CPU

This patch adds support for Ampere-1A CPU:
 - recognize the name of the core and provide detection for -mcpu=native,
 - updated extra_costs,
 - adds a new fusion pair for (A+B+1 and A-B-1).

Ampere-1A and Ampere-1 have more timing difference than the extra
costs indicate, but these don't propagate through to the headline
items in our extra costs (e.g. the change in latency for scalar sqrt
doesn't have a corresponding table entry).

gcc/ChangeLog:

* config/aarch64/aarch64-cores.def (AARCH64_CORE): Add ampere1a.
* config/aarch64/aarch64-cost-tables.h: Add ampere1a_extra_costs.
* config/aarch64/aarch64-fusion-pairs.def (AARCH64_FUSION_PAIR):
Define a new fusion pair for A+B+1/A-B-1 (i.e., add/subtract two
registers and then +1/-1).
* config/aarch64/aarch64-tune.md: Regenerate.
* config/aarch64/aarch64.cc (aarch_macro_fusion_pair_p): Implement
idiom-matcher for the new fusion pair.
* doc/invoke.texi: Add ampere1a.

(cherry picked from commit 590a06afbf0e96813b5879742f38f3665512c854)
gcc/config/aarch64/aarch64-cores.def
gcc/config/aarch64/aarch64-cost-tables.h
gcc/config/aarch64/aarch64-fusion-pairs.def
gcc/config/aarch64/aarch64-tune.md
gcc/config/aarch64/aarch64.cc
gcc/doc/invoke.texi