https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101178
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:7d8211603a3d04384812b481b0ae01205a287a72 commit r12-1949-g7d8211603a3d04384812b481b0ae01205a287a72 Author: Richard Biener <rguent...@suse.de> Date: Wed Jun 30 16:28:50 2021 +0200 tree-optimization/101178 - handle VEC_PERM in SLP permute propagation This adds handling of VEC_PERM nodes to SLP permute propagation. Previously VEC_PERM acted as forced materialization of incoming permutes since it is a good place to do that (with the constraint of those only appearing for two-operator nodes). The following patch, in addition to supporting (but not forcing) this, enables VEC_PERM nodes acting as "any" permute on the outgoing side since they also can consume arbitrary permutes on that side. This again (meh) changes how we represent permutes and materialization on the graph vertices now explicitely having the common incoming permute as well as an outgoing permute and in case both are different the vertex acts as materialization point of the incoming permute. 2021-06-30 Richard Biener <rguent...@suse.de> PR tree-optimization/101178 * tree-vect-slp.c (slpg_vertex::materialize): Remove. (slpg::perm_in): Add. (slpg::get_perm_in): Remove. (slpg::get_perm_materialized): Add. (vect_optimize_slp): Handle VEC_PERM nodes more optimally during permute propagation and materialization. * gcc.dg/vect/bb-slp-72.c: New testcase. * gcc.dg/vect/bb-slp-73.c: Likewise. * gcc.dg/vect/bb-slp-74.c: Likewise.