On 11/19/26 2:01 AM, Jin Ma wrote:
Prevent cache-block clearing and by-pieces expansion from bypassing
an explicit memset inline threshold.

Assisted-by: qwenwork

gcc/ChangeLog:

        * config/riscv/riscv-string.cc (riscv_expand_block_clear): Check the
        memset threshold.
        * config/riscv/riscv.cc (riscv_use_by_pieces_infrastructure_p): Honor
        the memset threshold before considering by-pieces expansion.

gcc/testsuite/ChangeLog:

        * gcc.target/riscv/setmem-cbo-threshold.c: New test.
        * gcc.target/riscv/setmem-pieces-threshold.c: New test.
Thanks.  I've pushed this to the trunk.

jeff

Reply via email to