[Mlir-commits] [mlir] [MLIR][Affine] Add test pass for affine isContiguousAccess (PR #82923)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Tue Feb 27 05:58:27 PST 2024


================
@@ -344,10 +333,12 @@ bool mlir::affine::isVectorizableLoopBody(
     auto load = dyn_cast<AffineLoadOp>(op);
     auto store = dyn_cast<AffineStoreOp>(op);
     int thisOpMemRefDim = -1;
-    bool isContiguous = load ? isContiguousAccess(loop.getInductionVar(), load,
-                                                  &thisOpMemRefDim)
-                             : isContiguousAccess(loop.getInductionVar(), store,
-                                                  &thisOpMemRefDim);
+    bool isContiguous =
+        load ? isContiguousAccess(loop.getInductionVar(),
+                                  (AffineReadOpInterface)load, &thisOpMemRefDim)
----------------
ftynse wrote:

Yes, please. 

I think I saw a discussion about making the pointer-based constructor private, but I don't recall where.

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


More information about the Mlir-commits mailing list