[AArch64] Support vectorising with multiple vector sizes
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 14 Nov 2019 15:15:34 +0000 (15:15 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 14 Nov 2019 15:15:34 +0000 (15:15 +0000)
commit74166aabeb7f22990476b1169bba031b8323ee92
tree4219985f8055da7225a0e6d9ab44d4e80c365f7d
parenta55d8232df3dd4f7a3f5b70025074c3919b802a6
[AArch64] Support vectorising with multiple vector sizes

This patch makes the vectoriser try mixtures of 64-bit and 128-bit
vector modes on AArch64.  It fixes some existing XFAILs and allows
kernel 24 from the Livermore Loops test to be vectorised (by using
a mixture of V2DF and V2SI).

2019-11-14  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/aarch64/aarch64.c (aarch64_vectorize_related_mode): New
function.
(aarch64_autovectorize_vector_modes): Also add V4HImode and V2SImode.
(TARGET_VECTORIZE_RELATED_MODE): Define.

gcc/testsuite/
* gcc.dg/vect/vect-outer-4f.c: Expect the test to pass on aarch64
targets.
* gcc.dg/vect/vect-outer-4g.c: Likewise.
* gcc.dg/vect/vect-outer-4k.c: Likewise.
* gcc.dg/vect/vect-outer-4l.c: Likewise.
* gfortran.dg/vect/vect-8.f90: Expect kernel 24 to be vectorized
for aarch64.
* gcc.target/aarch64/vect_mixed_sizes_1.c: New test.
* gcc.target/aarch64/vect_mixed_sizes_2.c: Likewise.
* gcc.target/aarch64/vect_mixed_sizes_3.c: Likewise.
* gcc.target/aarch64/vect_mixed_sizes_4.c: Likewise.

From-SVN: r278243
12 files changed:
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/vect-outer-4f.c
gcc/testsuite/gcc.dg/vect/vect-outer-4g.c
gcc/testsuite/gcc.dg/vect/vect-outer-4k.c
gcc/testsuite/gcc.dg/vect/vect-outer-4l.c
gcc/testsuite/gcc.target/aarch64/vect_mixed_sizes_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_mixed_sizes_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_mixed_sizes_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect_mixed_sizes_4.c [new file with mode: 0644]
gcc/testsuite/gfortran.dg/vect/vect-8.f90