[AArch64] Enable VECT_COMPARE_COSTS by default for SVE
authorRichard Sandiford <richard.sandiford@arm.com>
Sat, 16 Nov 2019 10:43:52 +0000 (10:43 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Sat, 16 Nov 2019 10:43:52 +0000 (10:43 +0000)
commiteb23241ba81aace0c881ccee4643632809741953
tree7eec28a84e7f30c72a362aff3439e15219dcea7e
parentbcc7e346bf9b5dc77797ea949d6adc740deb30ca
[AArch64] Enable VECT_COMPARE_COSTS by default for SVE

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  <richard.sandiford@arm.com>

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.

From-SVN: r278337
14 files changed:
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/aarch64.opt
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/reduc_3.c
gcc/testsuite/gcc.target/aarch64/sve/reduc_3_costly.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/slp_6.c
gcc/testsuite/gcc.target/aarch64/sve/slp_7.c
gcc/testsuite/gcc.target/aarch64/sve/slp_7_costly.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/slp_7_costly_run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/slp_7_run.c
gcc/testsuite/gcc.target/aarch64/sve/while_7.c
gcc/testsuite/gcc.target/aarch64/sve/while_9.c