[llvm] [AMDGPU] Overload resource descriptor in image intrinsics. (PR #107255)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 06:48:02 PDT 2024


================
@@ -857,8 +857,8 @@ class AMDGPUImageDimIntrinsic<AMDGPUDimProfile P_,
       !foreach(arg, P_.DataArgs, arg.Type),    // vdata(VGPR) -- for store/atomic
       !if(P_.IsAtomic, [], [llvm_i32_ty]),     // dmask(imm)
       P_.AddrTypes,                            // vaddr(VGPR)
-      [llvm_v8i32_ty],                         // rsrc(SGPR)
-      !if(P_.IsSample, [llvm_v4i32_ty,         // samp(SGPR)
+      [llvm_any_ty],                           // rsrc(SGPR); Valid types: v4i32 and v8i32
----------------
jayfoad wrote:

What happens if you use a different type, not v4i32 or v8i32? It would be nice if it failed with a "cannot select" error.

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


More information about the llvm-commits mailing list