https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127269
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Pan Li <[email protected]>: https://gcc.gnu.org/g:611705766efc7ea1dc2fa01e344db20e06546a27 commit r17-4547-g611705766efc7ea1dc2fa01e344db20e06546a27 Author: Pan Li <[email protected]> Date: Mon Sep 21 10:34:22 2026 +0800 RISC-V: Fix ICE for widening insn when dest nregs is less than src [PR target/127269] The function riscv_v_widen_constraint_ok asserts the nregs of the dest must be greater than that of the src when they are different. That is not always true, for example the vwmacc.vx with the src comes from the vget of one wider vector register group. Then we may have the dest takes 2 registers while the src takes 4 registers, and result in the ICE as below. during RTL pass: reload pr127269-18.c:14:1: internal compiler error: in riscv_v_widen_constraint_ok, at config/riscv/riscv-v.cc:6575 Thus, take the register overlap as not allowed instead of the assertion when the nregs of the dest is less than that of the src. PR target/127269 gcc/ChangeLog: * config/riscv/riscv-v.cc (riscv_v_widen_constraint_ok): Return false instead of assertion when the nregs of the dest is less than that of the src. Signed-off-by: Pan Li <[email protected]>
