I've mentioned some improvements for unaligned and overlapping code generation in the RISC-V call a few weeks ago. Sending this patches now, as the release is out.
Christoph Müllner (4): RISC-V: Add test cases for cpymem expansion RISC-V: Allow unaligned accesses in cpymemsi expansion RISC-V: tune: Add setting for overlapping mem ops to tuning struct RISC-V: Allow by-pieces to do overlapping accesses in block_move_straight gcc/config/riscv/riscv-string.cc | 59 +++++--- gcc/config/riscv/riscv.cc | 20 +++ .../gcc.target/riscv/cpymem-32-ooo.c | 137 ++++++++++++++++++ gcc/testsuite/gcc.target/riscv/cpymem-32.c | 136 +++++++++++++++++ .../gcc.target/riscv/cpymem-64-ooo.c | 130 +++++++++++++++++ gcc/testsuite/gcc.target/riscv/cpymem-64.c | 135 +++++++++++++++++ 6 files changed, 593 insertions(+), 24 deletions(-) create mode 100644 gcc/testsuite/gcc.target/riscv/cpymem-32-ooo.c create mode 100644 gcc/testsuite/gcc.target/riscv/cpymem-32.c create mode 100644 gcc/testsuite/gcc.target/riscv/cpymem-64-ooo.c create mode 100644 gcc/testsuite/gcc.target/riscv/cpymem-64.c -- 2.44.0