]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Bugfix for ICE in block move when zve32f
authorPan Li <pan2.li@intel.com>
Wed, 29 Nov 2023 06:31:30 +0000 (14:31 +0800)
committerPan Li <pan2.li@intel.com>
Wed, 29 Nov 2023 06:50:29 +0000 (14:50 +0800)
commit25a51e98fdd504826a40775a5e5b9ffb336b5aa1
treeae499715ac0816cc62fd9b681a33f7f4eb2c22ee
parent4ed0740c6e807460ce79a351094329fdeb551545
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.li@intel.com>
gcc/config/riscv/riscv-string.cc
gcc/testsuite/gcc.target/riscv/rvv/base/pr112743-1.c [new file with mode: 0644]