[AArch64] Use vec_perm_indices helper routines
commitdacc8387597f454dc8579cdd9df88767723f11c6
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Jan 2018 14:31:55 +0000 (9 14:31 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Jan 2018 14:31:55 +0000 (9 14:31 +0000)
tree98be6ba5839fc0b41fccb054283e55db367400ac
parentdc5936e2296cc26c62cd96678de33a0aee279cdf
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256385 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/aarch64/aarch64.c