[Mlir-commits] [mlir] [mlir][memref] Fix crash in DimOp::fold for subview with ambiguous dropped dims (PR #183995)

Matthias Springer llvmlistbot at llvm.org
Wed Mar 4 04:32:33 PST 2026


================
@@ -1084,8 +1084,12 @@ OpFoldResult DimOp::fold(FoldAdaptor adaptor) {
       }
       resultIndex++;
     }
-    assert(subview.isDynamicSize(sourceIndex) &&
-           "expected dynamic subview size");
+    // If the source dimension is not dynamic, getDroppedDims() may have
----------------
matthias-springer wrote:

This comment is confusing. I think this has nothing to do with `getDroppedDims()`.

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


More information about the Mlir-commits mailing list