Replace mode_for_int_vector with related_int_vector_mode
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 14 Nov 2019 14:39:57 +0000 (14:39 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 14 Nov 2019 14:39:57 +0000 (14:39 +0000)
commitd083ee47a9828236016841356fc7207e7c90bbbd
tree90747a64f3a7312d7fcdd25bc7c864ff408c02df
parentf09552335030433018fd5f7f6b9848339b5ca2da
Replace mode_for_int_vector with related_int_vector_mode

mode_for_int_vector, like mode_for_vector, can sometimes return
an integer mode or an unsupported vector mode.  But no callers
are interested in that case, and only want supported vector modes.
This patch therefore replaces mode_for_int_vector with
related_int_vector_mode, which gives the target a chance to pick
its preferred vector mode for the given element mode and size.

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

gcc/
* machmode.h (mode_for_int_vector): Delete.
(related_int_vector_mode): Declare.
* stor-layout.c (mode_for_int_vector): Delete.
(related_int_vector_mode): New function.
* optabs.c (expand_vec_perm_1): Use related_int_vector_mode
instead of mode_for_int_vector.
(expand_vec_perm_const): Likewise.
* config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Likewise.
(aarch64_evpc_sve_tbl): Likewise.
* config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
(s390_expand_vcond): Likewise.

From-SVN: r278230
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/config/s390/s390.c
gcc/machmode.h
gcc/optabs.c
gcc/stor-layout.c