https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90263
--- Comment #14 from Martin Liška <marxin at gcc dot gnu.org> --- Created attachment 46262 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46262&action=edit Patch candidate Patch candidate that handles: $ cat ~/Programming/testcases/mempcpy.c int *mempcopy2 (int *p, int *q, long n) { return __builtin_mempcpy (p, q, n); } $ ./xgcc -B. -O2 -S ~/Programming/testcases/mempcpy.c -o/dev/stdout ... mempcopy2: .LFB0: .cfi_startproc pushq %rbx .cfi_def_cfa_offset 16 .cfi_offset 3, -16 movq %rdx, %rbx call memcpy addq %rbx, %rax popq %rbx .cfi_def_cfa_offset 8 ret ... There's a single failing test: gcc.dg/20050503-1.c