[PATCH] D127766: [InstCombine] Fold memcmp of constant arrays and variable size

Martin Sebor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 16:09:59 PDT 2022


msebor updated this revision to Diff 437390.
msebor added a comment.

Revision 3 performs the `memcmp` character comparison in `unsigned char`.

I've left the loop as suggested but I expect to need to go back to something closer to the original in the `strncmp` followup.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127766/new/

https://reviews.llvm.org/D127766

Files:
  llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
  llvm/test/Transforms/InstCombine/memcmp-5.ll
  llvm/test/Transforms/InstCombine/memcmp-6.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127766.437390.patch
Type: text/x-patch
Size: 15374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220615/7211c5dc/attachment.bin>


More information about the llvm-commits mailing list