Handle poly_int vector sizes in get_vec_alignment_for_array_type
commit69e56cc07356215a5066e14df1d94a1e7ad0ee5b
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Jan 2018 14:48:35 +0000 (12 14:48 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Jan 2018 14:48:35 +0000 (12 14:48 +0000)
tree5c168a8611a66b43606b53ed5a4a6de713be0fb2
parent597e0685ecae78a3a409e68868321c3f1598cbbf
Handle poly_int vector sizes in get_vec_alignment_for_array_type

get_vectype_for_scalar_type returns a variable-length vector type
for SVE, whereas get_vec_alignment_for_array_type assumed it would
always be an INTEGER_CST.

This is needed to build libstdc++-v3/src/closures.cc for SVE
(and probably many other places besides -- this was just the
first hit).

2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
polynomial type sizes.

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