[AArch64] Enable VECT_COMPARE_COSTS by default for SVE

Programming / Compilers / GCC - rsandifo [138bc75d-0d04-0410-961f-82ee72b054a4] - 16 November 2019 10:43 EST

This patch enables VECT_COMPARE_COSTS by default for SVE, both so that we can compare SVE against Advanced SIMD and so that (with future patches) we can compare multiple SVE vectorisation approaches against each other. It also adds a target-specific --param to control this.

2019-11-16 Richard Sandiford

gcc/
- config/aarch64/aarch64.opt (--param=aarch64-sve-compare-costs): New option.
- doc/invoke.texi: Document it.
- config/aarch64/aarch64.c (aarch64_autovectorize_vector_modes): By default, return VECT_COMPARE_COSTS for SVE.

gcc/testsuite/
- gcc.target/aarch64/sve/reduc_3.c: Split multi-vector cases out into...
- gcc.target/aarch64/sve/reduc_3_costly.c: ...this new test, passing -fno-vect-cost-model for them.
- gcc.target/aarch64/sve/slp_6.c: Add -fno-vect-cost-model.
- gcc.target/aarch64/sve/slp_7.c,
- gcc.target/aarch64/sve/slp_7_run.c: Split multi-vector cases out into...
- gcc.target/aarch64/sve/slp_7_costly.c,
- gcc.target/aarch64/sve/slp_7_costly_run.c: ...these new tests, passing -fno-vect-cost-model for them.
- gcc.target/aarch64/sve/while_7.c: Add -fno-vect-cost-model.
- gcc.target/aarch64/sve/while_9.c: Likewise.

624e4c8070f [AArch64] Enable VECT_COMPARE_COSTS by default for SVE
gcc/ChangeLog | 8 ++++
gcc/config/aarch64/aarch64.c | 10 ++++-
gcc/config/aarch64/aarch64.opt | 4 ++
gcc/doc/invoke.texi | 18 ++++++++-
gcc/testsuite/ChangeLog | 16 ++++++++
gcc/testsuite/gcc.target/aarch64/sve/reduc_3.c | 26 +++++--------
.../gcc.target/aarch64/sve/reduc_3_costly.c | 32 ++++++++++++++++
gcc/testsuite/gcc.target/aarch64/sve/slp_6.c | 2 +-
gcc/testsuite/gcc.target/aarch64/sve/slp_7.c | 16 ++------
.../gcc.target/aarch64/sve/slp_7_costly.c | 43 ++++++++++++++++++++++
.../gcc.target/aarch64/sve/slp_7_costly_run.c | 5 +++
gcc/testsuite/gcc.target/aarch64/sve/slp_7_run.c | 6 ++-
gcc/testsuite/gcc.target/aarch64/sve/while_7.c | 2 +-
gcc/testsuite/gcc.target/aarch64/sve/while_9.c | 2 +-
14 files changed, 154 insertions(+), 36 deletions(-)

Upstream: gcc.gnu.org


  • Share