On 5/7/24 11:17 PM, Christoph Müllner wrote:
We have two mechanisms in the RISC-V backend that expand cpymem pattern: a) by-pieces, b) riscv_expand_block_move() in riscv-string.cc. The by-pieces framework has higher priority and emits a sequence of up to 15 instructions (see use_by_pieces_infrastructure_p() for more details). As a rule-of-thumb, by-pieces emits alternating load/store sequences and the setmem expansion in the backend emits a sequence of loads followed by a sequence of stores. Let's add some test cases to document the current behaviour and to have tests to identify regressions. Signed-off-by: Christoph Müllner <christoph.muell...@vrull.eu> gcc/testsuite/ChangeLog: * gcc.target/riscv/cpymem-32-ooo.c: New test. * gcc.target/riscv/cpymem-32.c: New test. * gcc.target/riscv/cpymem-64-ooo.c: New test. * gcc.target/riscv/cpymem-64.c: New test.
It looks like those function body tests are fairly generic. So OK. Jeff