SROA: Simplify addrspacecasted allocas with volatile accesses
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 15 Jun 2019 19:25:28 +0000 (15:25 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 2 Dec 2022 20:20:56 +0000 (15:20 -0500)
commit27387896cfe898e66f411ff26b8e34698a8f92fc
treea5e10dcd221259c0e565ffb6d47117e2ec573ae8
parentd0b954cc097d819720f24b60f551543cad4d7aae
SROA: Simplify addrspacecasted allocas with volatile accesses

If the alloca is accessed through an addrspacecasted pointer, allow
the normal changes on the alloca. Cast back to the original use
address space instead of the new alloca's natural address space.
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/test/CodeGen/AMDGPU/flat-address-space.ll
llvm/test/Transforms/SROA/addrspacecast.ll
llvm/test/Transforms/SROA/basictest.ll