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/32667] block copy with exact overlap is expanded as memcpy


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
And another way to fix this is add a new library entrypoint, that would have
the same semantics as memcpy, but would allow full overlap (dst == src).
When we e.g. expand this without a library call, we could do exactly what we do
for memcpy, because we know we do handle the dst == src case fine.  Similarly,
e.g. in glibc it could very well be just another alias to memcpy, because we
know it handles that too.  On targets which would not have the library function
we'd use the #c10 approach.  Of course, this would require coordination in
between glibc, gcc, valgrind, libsanitizer, memstomp etc.


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