[llvm] [NVPTX] Attach Range attr to setmaxnreg and fence intrinsics (PR #144120)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 11:03:42 PDT 2025


================
@@ -1341,9 +1341,11 @@ foreach scope = ["cta", "cluster", "gpu", "sys"] in {
         Intrinsic<[], [], [IntrNoCallback],
         "llvm.nvvm.fence.proxy.tensormap_generic.release." # scope>;
 
+  // The imm-arg 'size' can only be 128.
   def int_nvvm_fence_proxy_tensormap_generic_acquire_ # scope :
         Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty],
-                  [IntrNoCallback, IntrArgMemOnly, ImmArg<ArgIndex<1>>],
+                  [IntrNoCallback, IntrArgMemOnly, ImmArg<ArgIndex<1>>,
+                   Range<ArgIndex<1>, 128, 129>],
----------------
Artem-B wrote:

I like it. It removes a lot of my concerns about using immediate arguments that do not use whole range of values. 

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


More information about the llvm-commits mailing list