https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110381

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:53d6f57c1b20c6da52aefce737fb7d5263686ba3

commit r14-2095-g53d6f57c1b20c6da52aefce737fb7d5263686ba3
Author: Richard Biener <rguent...@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.

Reply via email to