[PATCH] D86025: [CodeGen] Respect libfunc availability when lowering intrinsic memcpy

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 11:58:58 PDT 2020


efriedma added a comment.

Conventionally, we've assumed that memcpy is available despite -fno-builtin etc., simply because generating it inline is too painful.  For example, consider what happens to your testcase if +strict-align is specified.  (This is following gcc, which has a similar expectation.)

If the requirement of having a symbol named "memcpy" is problematic, I guess we could look into making compiler-rt provide a symbol with equivalent semantics, but use a compiler-reserved name so the user can't disable it with -fno-builtin. For example, __aeabi_memcpy is defined on ARM.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86025



More information about the llvm-commits mailing list