[llvm] [AMDGPU] Add IntrArgMemOnly, WriteOnly on LDS Ptr for raw.buffer.load.lds and struct.buffer.load.lds (PR #154306)

Krzysztof Drewniak via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 19 08:18:40 PDT 2025


================
@@ -1991,7 +1991,9 @@ class AMDGPURawBufferLoadLDS : Intrinsic <
                               //        gfx12+: bits [0-2] = th, bits [3-4] = scope,
                               //                bit 6 = swz
                               //           all: volatile op (bit 31, stripped at lowering)
-  [IntrWillReturn, NoCapture<ArgIndex<1>>, ImmArg<ArgIndex<2>>, ImmArg<ArgIndex<5>>,
+  [IntrWillReturn, IntrArgMemOnly,
----------------
krzysz00 wrote:

No, I mean _because_ you _can't_ annotate that argument with `readonly` - it's not a pointer - it's incorrect to make this `IntrArgMemOnly`

The fact that you want to do this indicates that you should migrate to the raw_ptr_... variants of the intrinsic instead

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


More information about the llvm-commits mailing list