]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/101178 - handle VEC_PERM in SLP permute propagation
authorRichard Biener <rguenther@suse.de>
Wed, 30 Jun 2021 14:28:50 +0000 (16:28 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 1 Jul 2021 07:47:58 +0000 (09:47 +0200)
commit7d8211603a3d04384812b481b0ae01205a287a72
tree92a399096554ae139a5713d648a1a5dda3daa7a2
parentb0ab968999c9af88d45acf552ca673ef3960306a
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  <rguenther@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.
gcc/testsuite/gcc.dg/vect/bb-slp-72.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/bb-slp-73.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/bb-slp-74.c [new file with mode: 0644]
gcc/tree-vect-slp.c