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

--- Comment #2 from GCC 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:56e7010eef88d941c59e3d677b7bc67a890c210d

commit r16-3569-g56e7010eef88d941c59e3d677b7bc67a890c210d
Author: Richard Biener <rguent...@suse.de>
Date:   Thu Sep 4 09:33:58 2025 +0200

    tree-optimization/121768 - bogus double reduction detected

    The following changes how we detect double reductions, in particular
    not setting vect_double_reduction_def on the outer PHIs when the inner
    loop doesn't satisfy double reduction constraints.  It also simplifies
    the setup a bit by not having to detect wheter we process an inner
    loop of a double reduction.

            PR tree-optimization/121768
            * tree-vect-loop.cc (vect_inner_phi_in_double_reduction_p): Remove.
            (vect_analyze_scalar_cycles_1): Analyze inner loops of
            double reductions immediately and only mark fully recognized
            double reductions.  Skip already analyzed inner loops.
            (vect_is_simple_reduction): Change double_reduc from a flag
            to an output of the inner loop PHI and to whether we are
            processing an inner loop of a double reduction.

            * gcc.dg/vect/pr121768.c: New testcase.

Reply via email to