[Mlir-commits] [mlir] [MLIR] Fix a crash in CollapseLinalgDimensions (PR #181715)

Darshan Bhat llvmlistbot at llvm.org
Wed Feb 18 10:25:09 PST 2026


================
@@ -1348,6 +1348,10 @@ bool mlir::linalg::isDimSequencePreserved(AffineMap indexingMap,
 bool mlir::linalg::areDimSequencesPreserved(
     ArrayRef<AffineMap> maps, ArrayRef<ReassociationIndices> dimSequences) {
   return llvm::all_of(maps, [&](AffineMap map) {
+    // Dimension sequences can only be preserved in projected permutation maps.
+    if (!map.isProjectedPermutation()) {
----------------
darshan-opensource wrote:

@MaheshRavishankar can you please review the fix and merge this PR if it looks ok ?

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


More information about the Mlir-commits mailing list