]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/122722 - better SLP reduction group discovery
authorRichard Biener <rguenther@suse.de>
Tue, 18 Nov 2025 14:20:44 +0000 (15:20 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 19 Nov 2025 13:00:03 +0000 (14:00 +0100)
commit97a7d568f3d72076c3f9da062007e3298da9243f
tree5f8e764d819275aab05287dc6ee0a5815287fe08
parentc628aeacedc8faf063248c6c91c45f32ed5a94be
tree-optimization/122722 - better SLP reduction group discovery

The following improves the all-or-nothing discovery of reduction
groups to consider sub-groups by trying toplevel "matches" candidates
for this.  For simplicity and to limit compile-time failed sub-group
matches are not decomposed further, only the originally failed part
is tried again to discover more sub-groups.  Any remaining fails
get picked up by the current single-reduction handling.

PR tree-optimization/122722
* tree-vect-slp.cc (vect_analyze_slp_reductions): New
function, split out from vect_analyze_slp.  Try SLP
sub-groups.
(vect_analyze_slp_reduction_group): New helper.

* gcc.dg/vect/slp-reduc-14.c: New testcase.
gcc/testsuite/gcc.dg/vect/slp-reduc-14.c [new file with mode: 0644]
gcc/tree-vect-slp.cc