[AArch64] Use vec_perm_indices helper routines
authorRichard Sandiford <richard.sandiford@linaro.org>
Tue, 9 Jan 2018 14:31:55 +0000 (14:31 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 9 Jan 2018 14:31:55 +0000 (14:31 +0000)
commit326ac20ea30c776ccff82bf6f3cea8088e33d3b9
tree98be6ba5839fc0b41fccb054283e55db367400ac
parent509bb9b647516bbf6af77778d2ffe7e756be26df
[AArch64] Use vec_perm_indices helper routines

This patch makes the AArch64 vec_perm_const code use the new
vec_perm_indices routines, instead of checking each element individually.
This means that they extend naturally to variable-length vectors.

Also, aarch64_evpc_dup was the only function that generated rtl when
testing_p is true, and that looked accidental.  The patch adds the
missing check and then replaces the gen_rtx_REG/start_sequence/
end_sequence stuff with an assert that no rtl is generated.

2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
instead of checking each element individually.
(aarch64_evpc_uzp): Likewise.
(aarch64_evpc_zip): Likewise.
(aarch64_evpc_ext): Likewise.
(aarch64_evpc_rev): Likewise.
(aarch64_evpc_dup): Test the encoding for a single duplicated element,
instead of checking each element individually.  Return true without
generating rtl if
(aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
whether all selected elements come from the same input, instead of
checking each element individually.  Remove calls to gen_rtx_REG,
start_sequence and end_sequence and instead assert that no rtl is
generated.

From-SVN: r256385
gcc/ChangeLog
gcc/config/aarch64/aarch64.c