[Mlir-commits] [mlir] [MLIR][XeVM] Add xevm blockload and blockstore op definition. (PR #158118)

Sang Ik Lee llvmlistbot at llvm.org
Tue Sep 16 11:57:23 PDT 2025


================
@@ -58,6 +58,29 @@ func.func @blockprefetch2d(%ptr: !llvm.ptr<1>, %base_width: i32, %base_height: i
   return
 }
 
+// -----
+// CHECK-LABEL: func.func @blockload(
+// CHECK-SAME: %[[ARG0:.*]]: !llvm.ptr<1>)
+func.func @blockload(%ptr: !llvm.ptr<1>) -> vector<4xi16> {
+  // CHECK: %[[VAR0:.*]] = xevm.blockload %[[ARG0]]
+  // CHECK-SAME: cache_control = #xevm.load_cache_control<L1uc_L2uc_L3uc>
+  // CHECK-SAME: (!llvm.ptr<1>) -> vector<4xi16>
+  %loaded = xevm.blockload %ptr <{cache_control=#xevm.load_cache_control<L1uc_L2uc_L3uc>}>
+              : (!llvm.ptr<1>) -> vector<4xi16>
----------------
silee2 wrote:

Output is distributed to work item lanes.
The vector size represents how many elements are gathered per work item lane.

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


More information about the Mlir-commits mailing list