[PATCH] D155790: PreISelIntrinsicLowering: don't expand memcpys in minsize functions, even with no-builtins.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 09:04:44 PDT 2023


efriedma added a comment.

In D155790#4528021 <https://reviews.llvm.org/D155790#4528021>, @arsenm wrote:

> I think the fix that avoids the current problem, and solves my desires is to move from checking TargetLibraryInfo.hasLibFunc(memcpy) to checking if TargetLoweringInfo::getLibcallName(memcpy) is valid (plus maybe some additional libcall-is-valid-for-addrspace checks?). Sorting out the general libcall mess for freestanding is a problem for another day

So conventional CPU targets use "memcpy", GPUs and other exotic targets use the new expansion codepath?  That makes sense, I guess.

>> 3c848194f28decca41b7362f9dd35d4939797724 <https://reviews.llvm.org/rG3c848194f28decca41b7362f9dd35d4939797724> changes things so that instead of calling "memcpy", we generate a bunch of terrible inline code.
>
>
>
>> This apparently landed without review?
>
> This was D152383 <https://reviews.llvm.org/D152383>

Sorry, missed that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155790



More information about the llvm-commits mailing list