]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/101120 - fix compile-time issue with SLP groups
authorRichard Biener <rguenther@suse.de>
Fri, 18 Jun 2021 12:07:00 +0000 (14:07 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 21 Jun 2021 13:01:52 +0000 (15:01 +0200)
commit0ad9c7087ef3904da89f2db6007b6d28b116087f
treef4b7d5a5628d791a2c8ee0a3139cbfc38a046328
parent21761d2b2b01f6cef4287c646845f6b3006546aa
tree-optimization/101120 - fix compile-time issue with SLP groups

This places two hacks to avoid an old compile-time issue when
vectorizing large permuted SLP groups with gaps where we end up
emitting loads and IV adjustments for the gap as well and those
have quite a high cost until they are eventually cleaned up.

The first hack is to fold the auto-inc style IV updates early
in the vectorizer rather than in the next forwprop pass which
shortens the SSA use-def chains of the used IV.

The second hack is to remove the unused loads after we've picked
all that we possibly use.

2021-06-18  Richard Biener  <rguenther@suse.de>

PR tree-optimization/101120
* tree-vect-data-refs.c (bump_vector_ptr): Fold the
built increment.
* tree-vect-slp.c (vect_transform_slp_perm_load): Add
DR chain DCE capability.
* tree-vectorizer.h (vect_transform_slp_perm_load): Adjust.
* tree-vect-stmts.c (vectorizable_load): Remove unused
loads in the DR chain for SLP.
gcc/tree-vect-data-refs.c
gcc/tree-vect-slp.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.h