]> git.ipfire.org Git - thirdparty/gcc.git/commit
Harden SLP reduction support wrt STMT_VINFO_REDUC_IDX
authorRichard Biener <rguenther@suse.de>
Thu, 27 Jun 2024 09:36:07 +0000 (11:36 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Sun, 30 Jun 2024 09:42:57 +0000 (11:42 +0200)
commitb443d7122ee8013c5af127d3d183a03962967f57
tree0096832bebd0903b843fe90e2a17f9e0abcd56b8
parent3aa004f1db327d5728a8fd0afcfed24e767f0499
Harden SLP reduction support wrt STMT_VINFO_REDUC_IDX

The following makes sure that for a SLP reductions all lanes have
the same STMT_VINFO_REDUC_IDX.  Once we move that info and can adjust
it we can implement swapping.  It also makes the existing protection
against operand swapping trigger for all stmts participating in a
reduction, not just the final one marked as reduction-def.

* tree-vect-slp.cc (vect_build_slp_tree_1): Compare
STMT_VINFO_REDUC_IDX.
(vect_build_slp_tree_2): Prevent operand swapping for
all stmts participating in a reduction.
gcc/tree-vect-slp.cc