[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:24 PDT 2026
================
@@ -19,3 +20,24 @@ module attributes {transform.with_named_sequence} {
transform.yield
}
}
+
+// -----
+
+// Regression test for bug #204100.
+// Assertion idx < size() in SmallVector.h used to happen here.
+// CHECK-LABEL: func @add_dynamic
+module {
+ func.func @add_dynamic(%arg0: memref<?x?xbf16>, %arg1: memref<?x?xbf16>, %arg2: memref<?x?xbf16>) {
+ linalg.add ins(%arg0, %arg1 : memref<?x?xbf16>, memref<?x?xbf16>) outs(%arg2 : memref<?x?xbf16>)
+ return
+ }
+ module attributes {transform.with_named_sequence} {
+ transform.named_sequence @__transform_main(%arg0: !transform.any_op {transform.readonly}) {
+ %0 = transform.structured.match ops{["linalg.add"]} in %arg0 : (!transform.any_op) -> !transform.any_op
+ // This combination was crashing (static/dynamic mismatch)
+ transform.structured.vectorize %0 vector_sizes [8, [16], 4] : !transform.any_op
+ // expected-error @above {{Attempted to vectorize, but failed}}
+ transform.yield
+ }
+ }
+}
----------------
banach-space wrote:
Note to myself - still no addressed.
https://github.com/llvm/llvm-project/pull/205493
More information about the Mlir-commits
mailing list