[Bug tree-optimization/110381] [11/12 Regression] double counting for sum of structs of floating point types
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jul 7 12:06:54 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110381
--- Comment #21 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:32c7f05f8bc6d45dee374fe22be3f0e19836278a
commit r13-7543-g32c7f05f8bc6d45dee374fe22be3f0e19836278a
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jun 26 12:51:37 2023 +0200
tree-optimization/110381 - preserve SLP permutation with in-order
reductions
The following fixes a bug that manifests itself during fold-left
reduction transform in picking not the last scalar def to replace
and thus double-counting some elements. But the underlying issue
is that we merge a load permutation into the in-order reduction
which is of course wrong.
Now, reduction analysis has not yet been performend when optimizing
permutations so we have to resort to check that ourselves.
PR tree-optimization/110381
* tree-vect-slp.cc
(vect_optimize_slp_pass::start_choosing_layouts):
Materialize permutes before fold-left reductions.
* gcc.dg/vect/pr110381.c: New testcase.
(cherry picked from commit 53d6f57c1b20c6da52aefce737fb7d5263686ba3)
More information about the Gcc-bugs
mailing list