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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 19 09:23:47 PDT 2017


spatel added a comment.

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.


https://reviews.llvm.org/D36922





More information about the llvm-commits mailing list