enfoce SLP_TREE_VECTYPE for invariants
authorRichard Biener <rguenther@suse.de>
Mon, 18 May 2020 14:05:56 +0000 (16:05 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 22 May 2020 10:26:27 +0000 (12:26 +0200)
commit79f0451c67e8ed564b86a38581d5f3d57c5074d8
tree6d021593ca3438568971032ee89debbba1a036c2
parentb6ed2e2bca54d1d290f553549d28b0c60a0f240f
enfoce SLP_TREE_VECTYPE for invariants

This tries to enforce a set SLP_TREE_VECTYPE in vect_get_constant_vectors
and provides some infrastructure for setting it in the vectorizable_*
functions, amending those.

2020-05-22  Richard Biener  <rguenther@suse.de>

* tree-vectorizer.h (vect_is_simple_use): New overload.
(vect_maybe_update_slp_op_vectype): New.
* tree-vect-stmts.c (vect_is_simple_use): New overload
accessing operands of SLP vs. non-SLP operation transparently.
(vect_maybe_update_slp_op_vectype): New function updating
the possibly shared SLP operands vector type.
(vectorizable_operation): Be a bit more SLP vs non-SLP agnostic
using the new vect_is_simple_use overload;  update SLP invariant
operand nodes vector type.
(vectorizable_comparison): Likewise.
(vectorizable_call): Likewise.
(vectorizable_conversion): Likewise.
(vectorizable_shift): Likewise.
(vectorizable_store): Likewise.
(vectorizable_condition): Likewise.
(vectorizable_assignment): Likewise.
* tree-vect-loop.c (vectorizable_reduction): Likewise.
* tree-vect-slp.c (vect_get_constant_vectors): Enforce
present SLP_TREE_VECTYPE and check it matches previous
behavior.
gcc/ChangeLog
gcc/tree-vect-loop.c
gcc/tree-vect-slp.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.h