https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117353
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Robin Dapp <rd...@gcc.gnu.org>: https://gcc.gnu.org/g:cfdab86f20f6e77d9c8bf982989f78ef975c7611 commit r15-6210-gcfdab86f20f6e77d9c8bf982989f78ef975c7611 Author: Robin Dapp <rd...@ventanamicro.com> Date: Thu Dec 12 10:33:28 2024 +0100 RISC-V: Emit vector shift pattern for const_vector [PR117353]. In PR117353 and PR117878 we expand a const vector during reload. For this we use an unpredicated left shift. Normally an insn like this is split but as we introduce it late and cannot create pseudos anymore it remains unpredicated and is not recognized by the vsetvl pass (where we expect all insns to be in predicated RVV format). This patch directly emits a predicated shift instead. We could distinguish between !lra_in_progress and lra_in_progress and emit an unpredicated shift in the former case but we're not very likely to optimize it anyway so it doesn't seem worth it. PR target/117353 PR target/117878 gcc/ChangeLog: * config/riscv/riscv-v.cc (expand_const_vector): Use predicated instead of simple shift. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/pr117353.c: New test.