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

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

https://gcc.gnu.org/g:41e2fe9be1ff5ef2eafd49b30882898d26b9bf36

commit r16-3538-g41e2fe9be1ff5ef2eafd49b30882898d26b9bf36
Author: Richard Biener <[email protected]>
Date:   Wed Sep 3 10:04:58 2025 +0200

    tree-optimization/121758 - fix pattern stmt REDUC_IDX updating

    The following fixes a corner case of pattern stmt STMT_VINFO_REDUC_IDX
    updating which happens auto-magically.  When a 2nd pattern sequence
    uses defs from inside a prior pattern sequence then the first guess
    for the lookfor can be off.  This happens when for example widening
    patterns use vect_get_internal_def, which looks into earlier patterns.

            PR tree-optimization/121758
            * tree-vect-patterns.cc (vect_mark_pattern_stmts): Try
            harder to find a reduction continuation.

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

Reply via email to