[Mlir-commits] [mlir] [mlir] Fix ComposeExpandOfCollapseOp for dynamic case (PR #142663)
Ian Wood
llvmlistbot at llvm.org
Thu Jun 5 13:24:49 PDT 2025
================
@@ -387,11 +387,13 @@ struct ComposeExpandOfCollapseOp : public OpRewritePattern<ExpandOpTy> {
auto resultSubShape =
resultShape.slice(resultIndices.front(), resultIndices.size());
+ if (llvm::count_if(srcSubShape, ShapedType::isDynamic) >= 2)
+ return std::nullopt;
----------------
IanWood1 wrote:
I fixed the case you mentioned but I can't add a test until https://github.com/llvm/llvm-project/pull/142827
https://github.com/llvm/llvm-project/pull/142663
More information about the Mlir-commits
mailing list