[AArch64] Pass number of units to aarch64_expand_vec_perm(_const)
commitb0cebee7a42e15936c35784e1bafa463d53cae2b
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Nov 2017 20:02:49 +0000 (6 20:02 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Nov 2017 20:02:49 +0000 (6 20:02 +0000)
treefebc464d11da1b18798cc76439d27a731222ba17
parentabeff20d6129959fe358be542e2fcfaa6ec042b3
[AArch64] Pass number of units to aarch64_expand_vec_perm(_const)

This patch passes the number of units to aarch64_expand_vec_perm
and aarch64_expand_vec_perm_const, which avoids a to_constant ()
once GET_MODE_NUNITS is variable.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm)
(aarch64_expand_vec_perm_const): Take the number of units too.
* config/aarch64/aarch64.c (aarch64_expand_vec_perm)
(aarch64_expand_vec_perm_const): Likewise.
* config/aarch64/aarch64-simd.md (vec_perm_const<mode>)
(vec_perm<mode>): Update accordingly.

Reviewed-by: James Greenhalgh <james.greenhalgh@arm.com>
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254469 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/aarch64/aarch64-protos.h
gcc/config/aarch64/aarch64-simd.md
gcc/config/aarch64/aarch64.c