]> git.ipfire.org Git - thirdparty/gcc.git/commit
Better recover from SLP reassociation fails during discovery
authorRichard Biener <rguenther@suse.de>
Wed, 11 Sep 2024 12:50:02 +0000 (14:50 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 12 Sep 2024 07:20:48 +0000 (09:20 +0200)
commitf9e9ba9563c81ca2db99bf3daa6511c1471f1b78
tree453e4e2913b1c2a09881cb18498be5f913d65a5c
parent89d50c45048e5d7230ddde9afc8fbc83143e34cb
Better recover from SLP reassociation fails during discovery

When we decide to not process a association chain of size two and
that would also mismatch with a different chain size on another lane
we shouldn't fail discovery hard at this point.  Instead let the
regular discovery figure out matching lanes so the parent can
decide to perform operand swapping or we can split groups at better
points rather than forcefully splitting away the first single lane.

For example on gcc.dg/vect/vect-strided-u8-i8.c we now see two
groups of size 4 feeding the store instead of groups of size 1,
three, two, one and one.

* tree-vect-slp.cc (vect_build_slp_tree_2): On reassociation
chain length mismatch do not fail discovery of the node
but try without re-associating to compute a better matches[].
Provide a reassociation failure hint in the dump.
(vect_slp_analyze_node_operations): Avoid stray failure
dumping.
(vectorizable_slp_permutation_1): Dump the address of the
SLP node representing the permutation.
gcc/tree-vect-slp.cc