[PATCH] D152701: LowerMemIntrinsics: Check address space aliasing for memmove expansion

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 12 04:40:44 PDT 2023


arsenm created this revision.
arsenm added reviewers: sfertile, tra, jlebar, RKSimon, hliao, ebrevnov, bkramer, nikic.
Herald added subscribers: jeroen.dobbelaere, StephenFan, kerbowa, hiraditya, arichardson, jvesely.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

For cases where we cannot insert an addrspacecast, we can still expand
like a memcpy if we know the address spaces cannot alias. Normally
non-aliasing memmoves are optimized to memcpy, but we cannot rely on
that for lowering. If a target has aliasing address spaces that cannot
be casted between, we still have to give up lowering this.


https://reviews.llvm.org/D152701

Files:
  llvm/lib/Transforms/Utils/LowerMemIntrinsics.cpp
  llvm/test/CodeGen/AMDGPU/lower-mem-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152701.530460.patch
Type: text/x-patch
Size: 18908 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230612/9bc76e31/attachment.bin>


More information about the llvm-commits mailing list