[llvm] [AMDGPU] Handle lowering addrspace casts from LDS to FLAT address in amdgpu-sw-lower-lds. (PR #121214)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 21 06:20:09 PST 2025
================
@@ -655,6 +655,10 @@ void AMDGPUSwLowerLDS::getLDSMemoryInstructions(
} else if (AtomicCmpXchgInst *XCHG = dyn_cast<AtomicCmpXchgInst>(&Inst)) {
if (XCHG->getPointerAddressSpace() == AMDGPUAS::LOCAL_ADDRESS)
LDSInstructions.insert(&Inst);
+ } else if (AddrSpaceCastInst *AscI = dyn_cast<AddrSpaceCastInst>(&Inst)) {
+ if ((AscI->getSrcAddressSpace() == AMDGPUAS::LOCAL_ADDRESS) &&
+ (AscI->getDestAddressSpace() == AMDGPUAS::FLAT_ADDRESS))
----------------
arsenm wrote:
```suggestion
if (AscI->getSrcAddressSpace() == AMDGPUAS::LOCAL_ADDRESS &&
AscI->getDestAddressSpace() == AMDGPUAS::FLAT_ADDRESS)
```
https://github.com/llvm/llvm-project/pull/121214
More information about the llvm-commits
mailing list