AArch64: Add cost table for Cortex-A76
commit5c5a67e61bb8b97f46ec6581a7d187d89ffc2d88
authorWilco Dijkstra <wilco.dijkstra@arm.com>
Thu, 19 Nov 2020 16:14:11 +0000 (19 16:14 +0000)
committerWilco Dijkstra <wdijkstr@arm.com>
Thu, 19 Nov 2020 16:14:11 +0000 (19 16:14 +0000)
tree00dc4488dc3b41bae13d811ca808320a0d10e170
parent1d77928fc49b4f2487fd78db26bbebd00f881414
AArch64: Add cost table for Cortex-A76

Add an initial cost table for Cortex-A76 - this is copied from
cotexa57_extra_costs but updated based on the Optimization Guide.
Use the new cost table on all Neoverse tunings and ensure the tunings
are consistent for all.  As a result more compact code is generated
with more combined shift+alu operations. Eg. -mcpu=cortex-a76 will now
merge the shifts in:

int f(int x, int y) { return (x & y << 3) * (x | y << 3); }

and  w2, w0, w1, lsl 3
orr  w0, w0, w1, lsl 3
mul  w0, w2, w0
ret

SPEC2017 codesize improves by 0.02% and SPECINT2017 shows 0.24% gain.

2020-11-18  Wilco Dijkstra  <wdijkstr@arm.com>

gcc/
* config/aarch64/aarch64.c (neoversen1_tunings): Use new
cortexa76_extra_costs.
(neoversev1_tunings): Likewise.
(neoversen2_tunines): Likewise.
* config/arm/aarch-cost-tables.h (cortexa76_extra_costs):
add new costs.
gcc/config/aarch64/aarch64.c
gcc/config/arm/aarch-cost-tables.h