https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111121
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Wilco Dijkstra <wi...@gcc.gnu.org>: https://gcc.gnu.org/g:c534a9b198caa3807bcc592a3c5bac3f971417f7 commit r13-7921-gc534a9b198caa3807bcc592a3c5bac3f971417f7 Author: Wilco Dijkstra <wilco.dijks...@arm.com> Date: Tue Sep 26 16:42:45 2023 +0100 AArch64: Fix memmove operand corruption [PR111121] A MOPS memmove may corrupt registers since there is no copy of the input operands to temporary registers. Fix this by calling aarch64_expand_cpymem_mops. Reviewed-by: Richard Sandiford <richard.sandif...@arm.com> gcc/ChangeLog/ PR target/111121 * config/aarch64/aarch64.md (aarch64_movmemdi): Add new expander. (movmemdi): Call aarch64_expand_cpymem_mops for correct expansion. * config/aarch64/aarch64.cc (aarch64_expand_cpymem_mops): Add support for memmove. * config/aarch64/aarch64-protos.h (aarch64_expand_cpymem_mops): Add new function. gcc/testsuite/ChangeLog/ PR target/111121 * gcc.target/aarch64/mops_4.c: Add memmove testcases. (cherry picked from commit d8b56c95782aeeee79ec40932ca88d00fd9f2ee2)