[Mlir-commits] [mlir] [mlir][VectorToXeGPU] Fix crash on memref with non-scalar element type (PR #183905)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Mar 1 12:12:46 PST 2026


================
@@ -556,7 +565,8 @@ struct TransferReadLowering : public OpRewritePattern<vector::TransferReadOp> {
       return lowerToScatteredLoadOp(readOp, rewriter);
 
     // Perform common data transfer checks.
-    if (failed(storeLoadPreconditions(rewriter, readOp, vecTy)))
+    auto readMemTy = cast<MemRefType>(readOp.getShapedType());
+    if (failed(storeLoadPreconditions(rewriter, readOp, vecTy, readMemTy)))
----------------
sweiglbosker wrote:

Does this check make sense for these ops too? They seem to lower without crashing, at least. Maybe make the storeLoadPreconditions with memrefType param a separate overload that calls the original?

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


More information about the Mlir-commits mailing list