[PATCH] D126515: [InstCombine] Fold memchr of sequences of same characters

Martin Sebor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 31 15:10:26 PDT 2022


msebor updated this revision to Diff 433202.
msebor marked an inline comment as done.
msebor added a comment.
Herald added a subscriber: jsji.

- Add a `substr` helper function and call it.
- Remove a spurious change to `LibCallSimplifier::optimizeStrChr`.
- Add a missing conditional and a test case for it.


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

https://reviews.llvm.org/D126515

Files:
  llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
  llvm/test/Transforms/InstCombine/memchr-6.ll
  llvm/test/Transforms/InstCombine/memchr.ll
  llvm/test/Transforms/InstCombine/strchr-3.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126515.433202.patch
Type: text/x-patch
Size: 18864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220531/75340a39/attachment.bin>


More information about the llvm-commits mailing list