On 7/8/2026 7:08 PM, Jim Lin wrote:
In riscv_vector_expand_block_move, the memcpy path (!movmem_p) compared
the length against riscv_memcpy_size_threshold but gated the check on
riscv_memmove_size_threshold >= 0. Both params default to -1, so the
memcpy threshold was honored only when the unrelated memmove param was
set, and when memmove was set but memcpy left at -1 the "length > -1"
test rejected every constant-length copy.
Gate the memcpy path on riscv_memcpy_size_threshold, matching the
memmove branch above.
gcc/ChangeLog:
* config/riscv/riscv-string.cc (riscv_vector_expand_block_move):
Gate the memcpy path on riscv_memcpy_size_threshold instead of
riscv_memmove_size_threshold.
THanks. I've pushed this to the trunk.
jeff