[Bug middle-end/90263] Calls to mempcpy should use memcpy
wilco at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Apr 26 17:43:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90263
--- Comment #4 from Wilco <wilco at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> Because then you penalize properly maintained targets which do have
> efficient mempcpy. And even if some targets don't have efficient mempcpy
> right now, that doesn't mean they can't have it in the future. On the
> caller side, when not expanded inline, calling mempcpy instead of memcpy is
> smaller, often requires fewer registers to be live across the call etc.
Few targets have an optimized mempcpy, particularly when you look at other
libraries besides GLIBC. We could easily have a target hook to emit mempcpy,
but I believe the default should be to do what's fastest for most targets.
More information about the Gcc-bugs
mailing list