[PATCH] D128954: [InstCombine] Transform strrchr to memrchr for constant strings
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 1 00:43:51 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/BuildLibCalls.cpp:1543
+Value *llvm::emitMemRChr(Value *Ptr, Value *Val, Value *Len, IRBuilderBase &B,
+ const DataLayout &DL, const TargetLibraryInfo *TLI) {
+ LLVMContext &Context = B.GetInsertBlock()->getContext();
----------------
This one probably needs an isLibFuncEmittable check, because memrchr is a GNU extension. It looks like PS targets do mark it as unavailable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128954/new/
https://reviews.llvm.org/D128954
More information about the llvm-commits
mailing list