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

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

https://gcc.gnu.org/g:3c2b6906fb49401e0fe41b810e4396b72b969267

commit r16-6293-g3c2b6906fb49401e0fe41b810e4396b72b969267
Author: Robin Dapp <[email protected]>
Date:   Mon Dec 15 11:20:54 2025 +0100

    vect: Fix scale-only pass in vect_gather_scatter_fn_p [PR123118].

    In the process of refactoring the gather/scatter rework this likely got
    lost.  In the "third pass" we look for a configuration with a smaller
    scale and a larger offset type with the same signedness.  We want to be
    able to multiply the offset by the new scale but not change the offset
    sign.  What we actually checked is whether a converted offset type was
    supported without setting *supported_offset_vectype.

    This patch removes the check for the offset type change and replaces it
    with a TYPE_SIGN match.

            PR tree-optimization/123118

    gcc/ChangeLog:

            * tree-vect-data-refs.cc (vect_gather_scatter_fn_p): Check that
            the type sign is equal.

    gcc/testsuite/ChangeLog:

            * g++.target/riscv/rvv/autovec/pr123118.C: New test.

Reply via email to