[AArch64] Improve SVE handling of single-vector permutes
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 23 Aug 2018 08:57:17 +0000 (08:57 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 23 Aug 2018 08:57:17 +0000 (08:57 +0000)
commite25c95ef2af3700f614b0c6745c71d5185d53dac
treef6a0d9c3c1375e8239ad3addcc325515f4e70950
parent4ec8bb67480a6c92e0de72999cdc6b42c5c181e1
[AArch64] Improve SVE handling of single-vector permutes

aarch64_vectorize_vec_perm_const was failing to set one_vector_p
if the permute had only a single input.  This in turn was hiding
a problem in the SVE TBL handling: it accepted single-vector
variable-length permutes, but sent them through the general
two-vector aarch64_expand_sve_vec_perm, which is only set up
to handle constant-length permutes.

2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
of single-vector TBLs.
(aarch64_vectorize_vec_perm_const): Set one_vector_p when only
one input is given.

gcc/testsuite/
* gcc.dg/vect/no-vfa-vect-depend-2.c: Remove XFAIL.
* gcc.dg/vect/no-vfa-vect-depend-3.c: Likewise.
* gcc.dg/vect/pr65947-13.c: Update for vect_fold_extract_last.
* gcc.dg/vect/pr80631-2.c: Likewise.

From-SVN: r263804
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c
gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-3.c
gcc/testsuite/gcc.dg/vect/pr65947-13.c
gcc/testsuite/gcc.dg/vect/pr80631-2.c