https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125856

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Hongtao Liu from comment #2)
> > 
> > If it looks OK, we can expand the bounded memcpy like memmove.
> 
> Maybe at O2, we still use libcall, and at O3, expand like memmove?

In x86-64 glibc, memcpy is an alias of memmove.  We can do the same
in GCC after

commit b41f96465190751561f6909e858604ceab00595b
Author: H.J. Lu <[email protected]>
Date:   Mon Oct 20 16:14:34 2025 +0800

    x86-64: Inline memmove with overlapping unaligned loads and stores

Reply via email to