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

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 12:57:39 PDT 2020


aemerson added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:6438
   // use a (potentially long) sequence of loads and stores.
-  if (AlwaysInline) {
+  if (AlwaysInline || (!LibInfo->has(LibFunc_memcpy) && ConstantSize)) {
     assert(ConstantSize && "AlwaysInline requires a constant size!");
----------------
So if memcpy is not available but we have a non-constant size, then we still generate a memcpy call here?


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