[Bug middle-end/70140] Inefficient expansion of __builtin_mempcpy
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jul 14 13:01:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70140
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Wilco from comment #3)
> Yes. Ignoring GLIBC internals, mempcpy is used quite infrequently. As a
> result not many targets have added highly optimized implementations. The
> targets that do have the issue that mempcpy is typically not in the cache
> when called, while memcpy is more likely already cached.
>
FWIW, in x86-64 glibc, memcpy and mempcpy share the same function
body:
0000000000000010 <__mempcpy>:
10: 48 89 f8 mov %rdi,%rax
13: 48 01 d0 add %rdx,%rax
16: eb 1b jmp 33 <__memcpy+0x3>
More information about the Gcc-bugs
mailing list