[PATCH] D105072: [GISel] Support llvm.memcpy.inline

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 11:31:03 PDT 2021


aemerson added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/debug-loc-legalize-tail-call.mir:39
     %2:_(s64) = G_IMPLICIT_DEF debug-location !DILocation(line: 0, scope: !6)
-    G_MEMSET %0(p0), %1(s8), %2(s64), 1, debug-location !11 :: (store 1)
     DBG_VALUE 0, 0, !9, !DIExpression(), debug-location !12
----------------
jroelofs wrote:
> aemerson wrote:
> > If only memcpy has an inline variant then we shouldn't be generating G_MEMSETs with this extra argument?
> I was on the fence about whether to let them all have the same number of arguments or not, since there are several places where code is shared between different opcodes and having them have different operand counts would lead to lots of special case logic.
> 
> To strike a balance, maybe it should only be memcpy+memmove instead?
Why add to memmove though?

Another way to implement this is to just introduce a new G_MEMCPY_INLINE opcode, then we don't have to add another argument anywhere.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105072



More information about the llvm-commits mailing list