Split code out of vectorizable_slp_permutation
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 30 Aug 2022 14:43:45 +0000 (15:43 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Tue, 30 Aug 2022 14:43:45 +0000 (15:43 +0100)
commit5edc67b773372bf013f98a357912381d99de65f5
tree69d70df8d626c9a71924b475cd678346a7df31e3
parent25c2a50cc343eb7c2500b69a6556551d5221393f
Split code out of vectorizable_slp_permutation

A later patch needs to test whether the target supports a
lane_permutation_t without having to construct a full SLP
node to test that.  This patch splits out most of the work
of vectorizable_slp_permutation into a subroutine, so that
properties of the permutation can be passed explicitly without
disturbing the main interface.

The new subroutine still uses an slp_tree argument to get things
like the number of lanes and the vector type.  That's a bit clunky,
but it seemed like the least worst option.

gcc/
* tree-vect-slp.cc (vectorizable_slp_permutation_1): Split out from...
(vectorizable_slp_permutation): ...here.
gcc/tree-vect-slp.cc