[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 12:01:28 PDT 2017


spatel added a reviewer: majnemer.
spatel added a comment.

In https://reviews.llvm.org/D36922#846541, @davide wrote:

> While I understand your motivation, I don't see the immediate benefits. I'm happy to have this patch in InstCombine if you can show a case we can't catch already.


I don't understand your motivation in delaying/blocking this patch. Are you opposed to the existing transform?

The immediate benefit is shown in the test cases in this patch: we're replacing a libcall + cmp with a load + cmp. The transform exposes further IR-level optimizations because we can and do reason more effectively about a load + cmp than a memcmp libcall. If it's not clear, I can check in the test cases with their current behavior as the baseline, so we just have the test diffs here?


https://reviews.llvm.org/D36922





More information about the llvm-commits mailing list