]> 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>
Mon, 14 Nov 2022 13:52:15 +0000 (14:52 +0100)
commit590a06afbf0e96813b5879742f38f3665512c854
treedbd6aaa5db72286dbd4a9eeba1f5e0ac0aeee694
parent5ba25973e2f403ee48af2ba579af5017b2f650fb
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.
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