Hi Christoph: Generally LGTM, only 1 minor comment.
> @@ -3292,8 +3294,17 @@ riscv_expand_block_move (rtx dest, rtx src, rtx length) > unsigned HOST_WIDE_INT hwi_length = UINTVAL (length); > unsigned HOST_WIDE_INT factor, align; > > - align = MIN (MIN (MEM_ALIGN (src), MEM_ALIGN (dest)), BITS_PER_WORD); > - factor = BITS_PER_WORD / align; > + if (riscv_slow_unaligned_access_p) > + { > + align = MIN (MIN (MEM_ALIGN (src), MEM_ALIGN (dest)), > BITS_PER_WORD); > + factor = BITS_PER_WORD / align; > + } > + else > + { > + /* Assume data to be aligned. */ > + align = hwi_length * BITS_PER_UNIT; Either the variable should be renamed or just set to BITS_PER_WORD? e.g hwi_length = 15, then align =15 * 8 = 120 Although that still generated the result since mode_for_size still returns DI for rv64 and SI for rv32. > + factor = 1; I would prefer keep factor = BITS_PER_WORD / align; and then pull it outside like that: ```c if (riscv_slow_unaligned_access_p) align = MIN (MIN (MEM_ALIGN (src), MEM_ALIGN (dest)), BITS_PER_WORD); else align = BITS_PER_WORD; factor = BITS_PER_WORD / align; ```