[PATCH] D152383: CodeGen: Expand memory intrinsics in PreISelIntrinsicLowering

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 15:07:47 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/docs/ReleaseNotes.rst:274
 
+* ``llvm.memcpy``, ``llvm.memmove`` and ``llvm.memset`` are now
+  expanded into loops by default for targets which do not report the
----------------
hiraditya wrote:
> arsenm wrote:
> > hiraditya wrote:
> > > what happens when someone compiles a libc?
> > > will all the calls to memcpy in libc files convert into for loops?
> > > 
> > Ideally the implementation of libc's memcpy would be a call to llvm.memcpy. Runtime libcalls needs to know that it cannot emit such a call during lowering
> Thanks. it'll be great if we had some documentation on this.
Well we don't really, and the current situation is a bit of a mess. RuntimeLibcalls seems to be the forgotten partner to TargetLibraryInfo.


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

https://reviews.llvm.org/D152383



More information about the llvm-commits mailing list