]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/115669 - fix SLP reduction association
authorRichard Biener <rguenther@suse.de>
Thu, 27 Jun 2024 09:26:08 +0000 (11:26 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 27 Jun 2024 12:11:32 +0000 (14:11 +0200)
commit7886830bb45c4f5dca0496d4deae9a45204d78f5
treef84084174dd67d75c5fc2b1fdb4d914478209035
parent73ad57c244c283bf6da0c16630212f11b945eda5
tree-optimization/115669 - fix SLP reduction association

The following avoids associating a reduction path as that might
get STMT_VINFO_REDUC_IDX out-of-sync with the SLP operand order.
This is a latent issue with SLP reductions but now easily exposed
as we're doing single-lane SLP reductions.

When we achieved SLP only we can move and update this meta-data.

PR tree-optimization/115669
* tree-vect-slp.cc (vect_build_slp_tree_2): Do not reassociate
chains that participate in a reduction.

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