https://gcc.gnu.org/bugzilla/show_bug.cgi?id=129059
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Ma Jin <[email protected]>: https://gcc.gnu.org/g:41f0f5e148fd9bd97ee49ca3e82fbd635b3acfa2 commit r17-6868-g41f0f5e148fd9bd97ee49ca3e82fbd635b3acfa2 Author: Jin Ma <[email protected]> Date: Mon Nov 30 15:26:13 2026 +0800 RISC-V: Honor the memcpy threshold for by-pieces copies [PR129059] A constant-size block copy can go through move-by-pieces before the RISC-V block-move expander checks the memcpy threshold. Decline by-pieces expansion when the size exceeds an explicit threshold. Copies at the threshold can still use the normal expansion path. Known constant data can still be emitted as immediate stores. Assisted-by: qwenwork PR target/129059 gcc/ChangeLog: * config/riscv/riscv.cc (riscv_use_by_pieces_infrastructure_p): Honor the memcpy threshold for MOVE_BY_PIECES. gcc/testsuite/ChangeLog: * gcc.target/riscv/cpymem-pieces-threshold.c: New test. * gcc.target/riscv/rvv/base/cpymem-small-threshold-strict.c: Likewise.
