[llvm] [Lint][AMDGPU] No store to const addrspace (PR #109181)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 10:05:49 PDT 2024


================
@@ -401,6 +403,10 @@ void Lint::visitMemoryReference(Instruction &I, const MemoryLocation &Loc,
         "Unusual: Address one pointer dereference", &I);
 
   if (Flags & MemRef::Write) {
+    if (TT.isAMDGPU())
+      Check(!AMDGPU::isConstantAddressSpace(UnderlyingObject->getType()->getPointerAddressSpace()),
----------------
shiltian wrote:

Just to be clear, the "check" I meant here was `AMDGPU::isConstantAddressSpace`.

https://github.com/llvm/llvm-project/pull/109181


More information about the llvm-commits mailing list