[PATCH] D36922: [LibCallSimplifier] try harder to fold memcmp with constant arguments

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 19 09:38:55 PDT 2017


davide added a comment.

In https://reviews.llvm.org/D36922#846489, @spatel wrote:

> In https://reviews.llvm.org/D36922#846488, @davide wrote:
>
> > In https://reviews.llvm.org/D36922#846477, @spatel wrote:
> >
> > > In https://reviews.llvm.org/D36922#846470, @davide wrote:
> > >
> > > > What GCC does in this case? (or icc?)
> > >
> > >
> > > https://godbolt.org/g/oKf3s8
> > >
> > > So gcc gets it; icc did something terrible; clang also gets this, but in the x86 backend. This is moving the optimization up in the pipeline to hopefully combine with a common prefix optimization suggested by Joerg in https://reviews.llvm.org/D35035.
> >
> >
> > Do you have an example of a common prefix opt that fires if we perform this lowering as part of the instruction combiner?
>
>
> No. AFAIK, no such common prefix optimization exists in llvm.


So, maybe we might consider postponing this change until a real use-case shows up?
This doesn't seem to be a lot of code to add when/if a real opportunity shows up.


https://reviews.llvm.org/D36922





More information about the llvm-commits mailing list