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

--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Zhongyao Chen <[email protected]>:

https://gcc.gnu.org/g:1cca2bfbdaa4433002d321b580b173294ee88460

commit r17-1490-g1cca2bfbdaa4433002d321b580b173294ee88460
Author: Zhongyao Chen <[email protected]>
Date:   Wed Jan 14 11:38:02 2026 +0000

    tree-optimization - Require size > 1 for SLP reduction subgroups

    The SLP reduction subgroup analysis can succeed for size-1 groups,
    but this leads to poor code generation.  Size-1 cases should fall
    back to single-lane reduction instead.

    Handle size-1 groups by returning false from the analysis function,
    and add a loop exit check to avoid unnecessary processing.

            PR tree-optimization/123343

    gcc/ChangeLog:

            * tree-vect-slp.cc (vect_analyze_slp_reduction_group): Return
            false for group_size <= 1 at entry.
            (vect_analyze_slp_reductions): Add loop exit check for
            group_size <= 1.

    gcc/testsuite/ChangeLog:

            * gcc.dg/vect/slp-reduc-var.c: New testcase.

    Signed-off-by: Zhongyao Chen <[email protected]>
  • [Bug tree-optimization/123343] ... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to