On Tue, Aug 1, 2017 at 12:50 PM, Jakub Jelinek <ja...@redhat.com> wrote:
> On Thu, Jul 20, 2017 at 08:59:29AM +0200, Martin Liška wrote:
>> Hello.
>>
>> Following patch does sharing of expansion for mem{p,}cpy and also strpcy 
>> (with a known constant as source)
>> so that we use same type of expansion (direct insns emission, direct 
>> emission with a loop instruction and
>> library call). As mentioned in the PR, glibc does not provide an optimized 
>> version for majority of targets.
>>
>> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>
> This broke e.g.
> FAIL: gcc.dg/20050503-1.c scan-assembler-not call
> on i686-linux, the result is significantly worse.
> Also, while perhaps majority of targets don't provide optimized version,
> some targets do, including i?86/x86_64, and if the memcpy would be expanded
> as a call, it is much better to just emit mempcpy call instead.
> Just look at the testcase, because of this misoptimization we suddenly can't
> use a tail call.
>
>         Jakub

I opened:

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

-- 
H.J.

Reply via email to