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

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

https://gcc.gnu.org/g:05e7d542bcd76c37330cc98e4a5bce4699ad23b8

commit r15-10387-g05e7d542bcd76c37330cc98e4a5bce4699ad23b8
Author: Robin Dapp <[email protected]>
Date:   Mon Sep 1 11:41:34 2025 +0200

    RISC-V: Handle overlap in expand_vec_perm PR121742.

    In a two-source gather we unconditionally overwrite target with the
    first gather's result already.  If op1 == target this clobbers the
    source operand for the second gather.  This patch uses a temporary in
    that case.

            PR target/121742

    gcc/ChangeLog:

            * config/riscv/riscv-v.cc (expand_vec_perm): Use temporary if
            op1 and target overlap.

    gcc/testsuite/ChangeLog:

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

    (cherry picked from commit f957d352bd6f240829226405e9be7960071d1b9c)

Reply via email to