]> git.ipfire.org Git - thirdparty/gcc.git/commit
Unify last two vect_transform_slp_perm_load calls
authorRichard Biener <rguenther@suse.de>
Mon, 15 Sep 2025 12:03:00 +0000 (14:03 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 16 Sep 2025 11:27:38 +0000 (13:27 +0200)
commite717aabb6eff417a613a1247124bbd817d1414b3
tree1f8cbf2247096c54a490d524ddc2a4c406e6b88e
parent0810be83c1a9c6789920fcb0a4d98a3ddb64dd74
Unify last two vect_transform_slp_perm_load calls

The following unifies the vect_transform_slp_perm_load call done
in vectorizable_load with that eventually done in get_load_store_type.
On the way it fixes the conditions on which we can allow
VMAT_ELEMENTWISE or VMAT_GATHER_SCATTER when there's a SLP permutation
(and we arrange to not code generate that).  In particular that only
works for single-lane SLP of non-grouped loads or groups of size one.
VMAT_ELEMENTWISE does not (yet?) materialize a permutation upon
vector build but still relies on vect_transform_slp_perm_load.

* tree-vect-stmts.cc (get_load_store_type): Get in a flag
whether a SLP_TREE_LOAD_PERMUTATION on the node can be
code generated and use it.  Fix the condition on using
strided gather/scatter to avoid dropping a meaningful
permutation.
(vectorizable_store): Adjust.
(vectorizable_load): Analyze the permutation early and
pass the result down to get_load_store_type.  Fix the
condition on when we are allowed to elide a load permutation.
gcc/tree-vect-stmts.cc