LowerMemIntrinsics: Check address space aliasing for memmove expansion
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 10 Jun 2023 17:22:34 +0000 (13:22 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 14 Jun 2023 11:56:58 +0000 (07:56 -0400)
commit0696240384cf4b18f65e31d68b51df96c328cb24
tree88e1a3799a76946f5cf1dc7b1553bf8a831aac3c
parent00b1dd82d72f4000c26c28e1471128569255dadc
LowerMemIntrinsics: Check address space aliasing for memmove expansion

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.
llvm/lib/Transforms/Utils/LowerMemIntrinsics.cpp
llvm/test/CodeGen/AMDGPU/lower-mem-intrinsics.ll