[Mlir-commits] [mlir] [ROCDL] Added global/flag data prefetch ops (PR #171449)

Jakub Kuderski llvmlistbot at llvm.org
Tue Dec 9 10:06:45 PST 2025


================
@@ -1173,6 +1173,31 @@ def ROCDL_RawBufferAtomicCmpSwap :
   }];
 }
 
+//===---------------------------------------------------------------------===//
+// Memory prefetch intrinsics
+
+def ROCDL_GlobalPrefetchOp :
+  ROCDL_IntrOp<"global.prefetch", [], [], [], 0, 0, 0, 0, [1], ["scope"]>,
+  Arguments<(ins Arg<LLVM_PointerInAddressSpace<1>, "", []>:$ptr, I32Attr:$scope)> {
+  let description = [{
+    Prefetches 1 byte of data per lane from global memory into the WGP-cache or L2-cache.
+    Available on gfx1250+.
+  }];
+  let results = (outs);
+  let assemblyFormat = "$ptr `scope` $scope attr-dict";
----------------
kuhar wrote:

Should we also print the pointer type?

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


More information about the Mlir-commits mailing list