[Mlir-commits] [mlir] [MLIR][XeGPU][VectorToXeGPU] Lower vector.load/store/transfer_read/transfer_write to new offsets syntax (PR #162095)

Adam Siemieniuk llvmlistbot at llvm.org
Wed Oct 22 04:41:18 PDT 2025


================
@@ -116,38 +115,19 @@ createNdDescriptor(PatternRewriter &rewriter, Location loc,
     for (unsigned i = 0; i < srcRank; ++i)
       sourceDims.push_back(memref::DimOp::create(rewriter, loc, src, i));
 
-    SmallVector<int64_t> constOffsets;
-    SmallVector<Value> dynOffsets;
-    for (Value offset : offsets) {
-      std::optional<int64_t> staticVal = getConstantIntValue(offset);
-      if (!staticVal)
-        dynOffsets.push_back(offset);
-      constOffsets.push_back(staticVal.value_or(ShapedType::kDynamic));
-    }
-
-    SmallVector<Value> dynShapes;
+    SmallVector<OpFoldResult> mixedShapes;
----------------
adam-smnk wrote:

Do you have some specific case in mind?

My thinking is that as strides are already read dynamically through metadata, it might make sense to use the rest of the metadata for consistency.
Generally, if you extract metadata of, for example, subview going 3D -> 2D, the metadata is also 2D describing subview's result.

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


More information about the Mlir-commits mailing list