https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121742
--- Comment #2 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:f957d352bd6f240829226405e9be7960071d1b9c commit r16-3524-gf957d352bd6f240829226405e9be7960071d1b9c 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.
