This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/70140] Inefficient expansion of __builtin_mempcpy


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>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]