[Mlir-commits] [mlir] [MLIR][XeGPU] Allow load/store/prefetch uses [memref+offset] instead of tdesc (PR #150576)

Charitha Saumya llvmlistbot at llvm.org
Tue Jul 29 10:52:59 PDT 2025


================
@@ -644,8 +672,15 @@ LogicalResult CreateDescOp::verify() {
 //===----------------------------------------------------------------------===//
 LogicalResult PrefetchOp::verify() {
   auto tdescTy = getTensorDescType();
-  if (!tdescTy.isScattered())
-    return emitOpError("Expects a scattered TensorDesc.\n");
+
+  if (tdescTy) {
+    if (!tdescTy.isScattered())
+      return emitOpError("Expects a scattered TensorDesc.\n");
+  } else {
+    if (getRankOf(getSource()) > 1)
+      return emitOpError(
+          "Expecting the source is a 1D memref or pointer (uint64_t).");
+  }
----------------
charithaintc wrote:


```suggestion

  if (tdescTy && !tdescTy.isScattered())
    return emitOpError("Expects a scattered TensorDesc.\n");
  
  if (getRankOf(getSource()) > 1)
    return emitOpError(
        "Expecting the source is a 1D memref or pointer (uint64_t).");
  
```

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


More information about the Mlir-commits mailing list