[PATCH] D123629: [InstCombine] Fold memrchr calls with a constant character.

Martin Sebor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 12 13:36:50 PDT 2022


msebor created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
msebor requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This change implements folding of `memrchr` calls with a constant array and character, analogous to `memchr`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D123629

Files:
  llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
  llvm/test/Transforms/InstCombine/memrchr-3.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123629.422324.patch
Type: text/x-patch
Size: 6461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220412/5c360a1f/attachment.bin>


More information about the llvm-commits mailing list