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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 09:49:27 PDT 2023


arsenm created this revision.
arsenm added reviewers: bogner, AMDGPU, gchatelet, efriedma, aemerson, paquette, craig.topper, RKSimon, sfertile, ebrevnov.
Herald added subscribers: foad, kerbowa, pengfei, hiraditya, tpr, jvesely.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

Expand large or unknown size memory intrinsics into loops in the
default lowering pipeline if the target doesn't have the corresponding
libfunc. Previously AMDGPU had a custom pass which existed to call the
expansion utilities.

      

With a default no-libcall option, we can remove the libfunc checks in
LoopIdiomRecognize for these, which never made any sense. This also
provides a path to lifting the immarg restriction on
llvm.memcpy.inline.

There seems to be a bug where TLI reports functions as available if
you use -march and not -mtriple.


https://reviews.llvm.org/D152383

Files:
  llvm/docs/ReleaseNotes.rst
  llvm/include/llvm/Analysis/TargetTransformInfo.h
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/lib/Analysis/TargetTransformInfo.cpp
  llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
  llvm/lib/CodeGen/TargetPassConfig.cpp
  llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
  llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
  llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
  llvm/lib/Target/ARM/ARMTargetTransformInfo.h
  llvm/lib/Target/X86/X86TargetTransformInfo.h
  llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.memcpy.inline.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.memcpy.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.memmove.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.memset.ll
  llvm/test/CodeGen/AMDGPU/lower-mem-intrinsics-threshold.ll
  llvm/test/CodeGen/AMDGPU/lower-mem-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152383.529350.patch
Type: text/x-patch
Size: 24146 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230607/c03efc19/attachment.bin>


More information about the llvm-commits mailing list