tree-optimization/101615 - SLP permute opt of existing vectors
authorRichard Biener <rguenther@suse.de>
Wed, 28 Jul 2021 12:16:35 +0000 (14:16 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 28 Jul 2021 13:14:19 +0000 (15:14 +0200)
commit6bb6e2044ced33d08175361b8e39a9c5d4a868a6
tree394e67b07401407ca837ea9f674100fdb3e72196
parent1af16666943ef075673501765a13e425e47015cd
tree-optimization/101615 - SLP permute opt of existing vectors

This fixes one issue discovered when analyzing PR101615, namely
we happily push permutes to pre-existing vectors but end up
not actually permuting them.  In fact we don't want to, so force
materialization on the external.

It doesn't fix the original testcase though.

2021-07-28  Richard Biener  <rguenther@suse.de>

PR tree-optimization/101615
* tree-vect-slp.c (vect_optimize_slp): Pre-existing vector
external nodes cannot be permuted so make them perm_out 0.

* gcc.dg/vect/bb-slp-pr101615-1.c: New testcase.
gcc/testsuite/gcc.dg/vect/bb-slp-pr101615-1.c [new file with mode: 0644]
gcc/tree-vect-slp.c