[Mlir-commits] [llvm] [mlir] [Linalg] Fix crash in vectorizeScalableVectorPrecondition with undersized vector sizes (PR #205493)

Andrzej WarzyƄski llvmlistbot at llvm.org
Fri Aug 21 03:28:05 PDT 2026


================
@@ -2484,6 +2484,14 @@ LogicalResult mlir::linalg::vectorizeOpPrecondition(
   if (!hasVectorizationImpl(op))
     return failure();
 
+  // More vector sizes than loops means the extra entries have no iteration
+  // space dimension to describe. The scalable precondition below indexes the
+  // iterator types by vector size position, so an oversized list would trip an
+  // out-of-bounds assertion there.
----------------
banach-space wrote:

Having more vector sizes than loops just doesn't make sense - no need to refer to an assertion in some other pre-condition hook (that's an implementation detail of that hook).
```suggestion
  // More vector sizes than loops means the extra entries have no iteration
  // space dimension to describe.
```

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


More information about the Mlir-commits mailing list