[PATCH] D123816: [InstCombine] Fold strnlen with a bound of zero and one.

Martin Sebor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 13:01:40 PDT 2022


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

Fix logic error and use `zext` instead of `select`.


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

https://reviews.llvm.org/D123816

Files:
  llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
  llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
  llvm/test/Transforms/InstCombine/strnlen-1.ll
  llvm/test/Transforms/InstCombine/strnlen-2.ll
  llvm/test/Transforms/InstCombine/strnlen-3.ll
  llvm/test/Transforms/InstCombine/strnlen-5.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123816.425004.patch
Type: text/x-patch
Size: 10564 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220425/6d514b13/attachment.bin>


More information about the llvm-commits mailing list