https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112743
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Pan Li <pa...@gcc.gnu.org>: https://gcc.gnu.org/g:25a51e98fdd504826a40775a5e5b9ffb336b5aa1 commit r14-5945-g25a51e98fdd504826a40775a5e5b9ffb336b5aa1 Author: Pan Li <pan2...@intel.com> Date: Wed Nov 29 14:31:30 2023 +0800 RISC-V: Bugfix for ICE in block move when zve32f The exact_div requires the exactly multiple of the divider. Unfortunately, the condition will be broken when zve32f in some cases. For example, potential_ew is 8 BYTES_PER_RISCV_VECTOR * lmul1 is [4, 4] This patch would like to ensure the precondition of exact_div when get_vec_mode. PR target/112743 gcc/ChangeLog: * config/riscv/riscv-string.cc (expand_block_move): Add precondition check for exact_div. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/pr112743-1.c: New test. Signed-off-by: Pan Li <pan2...@intel.com>