diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-11-14 14:39:57 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-11-14 14:39:57 +0000 |
commit | d083ee47a9828236016841356fc7207e7c90bbbd (patch) | |
tree | 90747a64f3a7312d7fcdd25bc7c864ff408c02df /gcc/machmode.h | |
parent | f09552335030433018fd5f7f6b9848339b5ca2da (diff) | |
download | gcc-d083ee47a9828236016841356fc7207e7c90bbbd.zip gcc-d083ee47a9828236016841356fc7207e7c90bbbd.tar.gz gcc-d083ee47a9828236016841356fc7207e7c90bbbd.tar.bz2 |
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
Diffstat (limited to 'gcc/machmode.h')
-rw-r--r-- | gcc/machmode.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/gcc/machmode.h b/gcc/machmode.h index 906b216..6750833 100644 --- a/gcc/machmode.h +++ b/gcc/machmode.h @@ -879,22 +879,9 @@ smallest_int_mode_for_size (poly_uint64 size) extern opt_scalar_int_mode int_mode_for_mode (machine_mode); extern opt_machine_mode bitwise_mode_for_mode (machine_mode); extern opt_machine_mode mode_for_vector (scalar_mode, poly_uint64); -extern opt_machine_mode mode_for_int_vector (unsigned int, poly_uint64); extern opt_machine_mode related_vector_mode (machine_mode, scalar_mode, poly_uint64 = 0); - -/* Return the integer vector equivalent of MODE, if one exists. In other - words, return the mode for an integer vector that has the same number - of bits as MODE and the same number of elements as MODE, with the - latter being 1 if MODE is scalar. The returned mode can be either - an integer mode or a vector mode. */ - -inline opt_machine_mode -mode_for_int_vector (machine_mode mode) -{ - return mode_for_int_vector (GET_MODE_UNIT_BITSIZE (mode), - GET_MODE_NUNITS (mode)); -} +extern opt_machine_mode related_int_vector_mode (machine_mode); /* A class for iterating through possible bitfield modes. */ class bit_field_mode_iterator |