[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


================
@@ -667,6 +709,15 @@ LogicalResult LoadGatherOp::verify() {
   auto maskTy = getMaskType();
   auto valueTy = getValueType();
 
+  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:

check the suggested change above. in summary, we should try to combine conditions and return early rather than nesting if conditions. 

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


More information about the Mlir-commits mailing list