[PATCH] D155168: [OSX][TargetLibraryInfo] Mark memchr as unavailable on OSX

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 03:18:58 PDT 2023


nikic added a comment.

> Tests for this feature also cannot be easily added: https://reviews.llvm.org/D134134#3801747

You should be able to test that InstCombine does not perform the strrchr -> memrchr fold if a macos triple is given.



================
Comment at: llvm/lib/Analysis/TargetLibraryInfo.cpp:206
     TLI.setAvailable(LibFunc_putchar_unlocked);
+    TLI.setUnavailable(LibFunc_memchr);
 
----------------
Isn't this supposed to be memrchr?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155168



More information about the llvm-commits mailing list