Use ssizetype selectors for autovectorised VEC_PERM_EXPRs
commit0c1a6f5685cc0cbf6bf1a28f6ad4ac6c488cc63b
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Jan 2018 18:27:35 +0000 (2 18:27 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Jan 2018 18:27:35 +0000 (2 18:27 +0000)
tree963d6682878902655fb09b1a218b3b9537b7b594
parent90eb88226b6c845d94786bea2dc1a653a13971a0
Use ssizetype selectors for autovectorised VEC_PERM_EXPRs

The previous patches mean that there's no reason that constant
VEC_PERM_EXPRs need to have the same shape as the data inputs.
This patch makes the autovectoriser use sizetype elements instead,
so that indices don't get truncated for large or variable-length
vectors.

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

gcc/
* tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
the selector elements to be different from the data elements
if the selector is a VECTOR_CST.
* tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
ssizetype for the selector.

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