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

--- Comment #13 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:bc9e32c5ebb0237a36e17825276f892ef7e41f1d

commit r16-7040-gbc9e32c5ebb0237a36e17825276f892ef7e41f1d
Author: Richard Biener <[email protected]>
Date:   Fri Jan 23 15:24:53 2026 +0100

    tree-optimization/122474 - adjust check for .VEC_SHL_INSERT

    The r16-4558-g1b387bd8978577 change added a check that does not
    match what the commit message says.  The following fixes this,
    trying to more closely match up what we later do during transform
    and what we check here.  As cleanup this also makes sure that
    we compute the neutral value for the scalar type and consistently
    when it depends on the initial value, recording it in a new
    VECT_REDUC_INFO_NEUTRAL_OP.  This avoids issues with comparing
    the neutral and initial value when it is bool.  This also
    refactors vect_transform_cycle_phi a bit to remove dead code
    and make the flow easier to follow.

            PR tree-optimization/122474
            * tree-vectorizer.h (vect_reduc_info_s::neutral_op): New.
            (VECT_REDUC_INFO_NEUTRAL_OP): New.
            * tree-vect-loop.cc (vectorizable_reduction): Adjust condition
            guarding the check for .VEC_SHL_INSERT.

            * gcc.target/aarch64/sve2/pr123053.c: New testcase.
            * gcc.target/riscv/rvv/pr122474.c: Likewise.

Reply via email to