diff mbox series

aarch64: Assume zero gather/scatter set-up cost for -mtune=generic

Message ID mptcylsk5ws.fsf@arm.com
State New
Headers show
Series aarch64: Assume zero gather/scatter set-up cost for -mtune=generic | expand

Commit Message

Richard Sandiford Aug. 28, 2024, 3:45 p.m. UTC
generic_vector_cost is not currently used by any SVE target
by default; it has to be specifically selected by -mtune=generic.
Its SVE costing has historically been somewhat idealised, since
it predated any actual SVE cores.  This seems like a useful
tradition to continue, at least for testing purposes.

The ideal case is that gathers and scatters do not induce a specific
one-off overhead.  This patch therefore sets the gather/scatter init
costs to zero.

This patch is necessary to switch -mtune=generic over to the
"new" vector costs.

Tested on aarch64-linux-gnu.  Pushed as previously agreed with
Tamar and Kyrill.

Richard


gcc/
	* config/aarch64/tuning_models/generic.h (generic_sve_vector_cost):
	Set gather_load_x32_init_cost and gather_load_x64_init_cost to 0.
---
 gcc/config/aarch64/tuning_models/generic.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/gcc/config/aarch64/tuning_models/generic.h b/gcc/config/aarch64/tuning_models/generic.h
index 101969bdbb9..ee2f3ff4266 100644
--- a/gcc/config/aarch64/tuning_models/generic.h
+++ b/gcc/config/aarch64/tuning_models/generic.h
@@ -105,8 +105,8 @@  static const sve_vec_cost generic_sve_vector_cost =
   2, /* fadda_f64_cost  */
   4, /* gather_load_x32_cost  */
   2, /* gather_load_x64_cost  */
-  12, /* gather_load_x32_init_cost  */
-  4, /* gather_load_x64_init_cost  */
+  0, /* gather_load_x32_init_cost  */
+  0, /* gather_load_x64_init_cost  */
   1 /* scatter_store_elt_cost  */
 };