]> git.ipfire.org Git - thirdparty/gcc.git/commit
Avoid setting current_vector_size in get_vec_alignment_for_array_type
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Oct 2019 06:40:36 +0000 (06:40 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Oct 2019 06:40:36 +0000 (06:40 +0000)
commitd52decc96d39e49e288c44089384bafc6e019b30
treed082adc3becb58d53fcfa1683ccb991a353b9bd3
parent624eed14c4d500efa3414c1c3e7cff6b2591f45e
Avoid setting current_vector_size in get_vec_alignment_for_array_type

The increase_alignment pass was using get_vectype_for_scalar_type
to get the preferred vector type for each array element type.
This has the effect of carrying over the vector size chosen by
the first successful call to all subsequent calls, whereas it seems
more natural to treat each array type independently and pick the
"best" vector type for each element type.

2019-10-21  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vectorizer.c (get_vec_alignment_for_array_type): Use
get_vectype_for_scalar_type_and_size instead of
get_vectype_for_scalar_type.

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