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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <l...@gcc.gnu.org>:

https://gcc.gnu.org/g:980e1fc195325cd4637ce52d0e2b0e7fcc763f60

commit r16-3166-g980e1fc195325cd4637ce52d0e2b0e7fcc763f60
Author: Robin Dapp <rdapp....@gmail.com>
Date:   Mon Aug 4 11:09:50 2025 +0200

    RISC-V: Expand const_vector with 2 elts per pattern.

    Hi,

    In PR121334 we are asked to expand a const_vector of size 4 with
    poly_int elements.  It has 2 elts per pattern so is neither a
    const_vector_duplicate nor a const_vector_stepped.

    We don't allow this kind of constant in legitimate_constant_p but expr
    apparently still wants us to expand it under certain conditions.

    This patch implements a basic expander for such kinds of patterns.
    As slide1up is used to build the individual vectors it also adds
    a helper function expand_slide1up.

    I regtested on rv64gcv_zvl512b but unfortunately the newly created pattern
is
    not even executed.  I tried some variations of the original code but didn't
    manage to trigger it.

    Regards
     Robin

            PR target/121334

    gcc/ChangeLog:

            * config/riscv/riscv-v.cc (expand_slide1up): New function.
            (expand_vector_init_trailing_same_elem): Use new function.
            (expand_const_vector_onestep): New function.
            (expand_const_vector): Uew expand_slide1up.
            (expand_vector_init_merge_repeating_sequence): Ditto.
            (shuffle_off_by_one_patterns): Ditto.

    gcc/testsuite/ChangeLog:

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

Reply via email to