Jakub Jelinek wrote: > On Thu, Apr 12, 2018 at 03:53:13PM +0000, Wilco Dijkstra wrote:
>> The tailcall issue is just a distraction. Historically the handling of >> mempcpy >> has been horribly inefficient in both GCC and GLIBC for practically all >> targets. >> This is why it was decided to defer to memcpy. > > I guess we need to agree to disagree. But we have a P1 PR that we need to > resolve and it is one of the last 6 blockers we have. I'm not suggesting to > revert PR70140, just let use mempcpy libcall if it is what the user wrote and > we aren't expanding it inline. Frankly I don't see why it is a P1 regression. Do you have a benchmark that regresses significantly (a few percent, not by a few bytes)? I already showed the AArch64 results for GLIBC, do you have x86 results that prove things are much worse? >> So generally it's a good idea to change mempcpy into memcpy by default. It's >> not slower than calling mempcpy even if you have a fast implementation, it's >> faster >> if you use an up to date GLIBC which calls memcpy, and it's significantly >> better >> when using an old GLIBC. > > mempcpy is quite good on many targets even in old GLIBCs. Only true if with "many" you mean x86, x86_64 and IIRC sparc. Wilco