[PATCH] D50233: [InstCombine] Transform str(n)cmp to memcmp
Adam Reichold via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 12:49:21 PDT 2018
adamreichold added a comment.
In https://reviews.llvm.org/D50233#1223691, @xbolva00 wrote:
> In https://reviews.llvm.org/D50233#1223686, @adamreichold wrote:
>
> > But that also implies that you have to emit an inline implementation since you might not control what the implementation of `memcmp` supplied by `libc` does?
>
>
> LLVM already expands memcmp if possible, as we can see https://godbolt.org/z/o9CEYv (vs. https://godbolt.org/z/D8RhVl)
>From what I understand this is done as an optimization on a best-effort basis whereas in this case it is a precondition for the soundness of this particular optimization.
Repository:
rL LLVM
https://reviews.llvm.org/D50233
More information about the llvm-commits
mailing list