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

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

https://gcc.gnu.org/g:4470b9d14e0a2435fb44fef0c45891eea14dedc2

commit r17-1591-g4470b9d14e0a2435fb44fef0c45891eea14dedc2
Author: Robin Dapp <[email protected]>
Date:   Tue Jun 16 07:47:13 2026 -0600

    [PATCH] vect: Fix gather supported vectype [PR125516].Hi,

    This patch fixes a mistake in gather/scatter discovery.  In the third
    "phase" we check for a larger offset type for the needed scaling but
    fail to let the vectorizer know it.  The patch just sets
    supported_offset_vectype and also skips costing an instruction in case
    the necessary conversion is a nop.

    Bootstrapped and regtested on x86, power10, and aarch64.
    Regtested on riscv64.

    Regards
     Robin

            PR tree-optimization/125516

    gcc/ChangeLog:

            * tree-vect-data-refs.cc (vect_gather_scatter_fn_p): Set
            supported_offset_vectype.
            * tree-vect-stmts.cc (vectorizable_store): Skip nop conversions
            when costing scatters.
            (vectorizable_load): Ditto for gathers.

    gcc/testsuite/ChangeLog:

            * gcc.target/riscv/rvv/autovec/pr125516.c: New test.

Reply via email to