[Mlir-commits] [mlir] [MLIR][Linalg] Prevent PackOp canonicalization crash on zero tile factor (PR #185624)
Renato Golin
llvmlistbot at llvm.org
Tue Mar 10 05:59:04 PDT 2026
================
@@ -0,0 +1,23 @@
+// RUN: mlir-opt %s --inline --sccp --canonicalize -split-input-file -verify-diagnostics
+
+func.func @get_tile_size() -> index {
+ %c0 = arith.constant 0 : index
+ return %c0 : index
+}
+
+func.func private @use(%A: tensor<?x16x?x1xi32>)
+
+func.func @pack(%A: tensor<7x16xi32>) {
+ %c1 = arith.constant 1 : index
+ %pad_val = arith.constant 123 : i32
+ %tile_size = func.call @get_tile_size() : () -> index
+ %empty = tensor.empty(%c1, %tile_size) : tensor<?x16x?x1xi32>
+ // expected-error @below {{invalid zero tile factor}}
----------------
rengolin wrote:
You don't seem to be adding this error message, so it's coming from somewhere else. This PR does not look like the right fix. Please try to understand the problem and the fix first.
https://github.com/llvm/llvm-project/pull/185624
More information about the Mlir-commits
mailing list