[Mlir-commits] [mlir] [mlir][spirv] Fix crash in FuncOpVectorUnroll for dynamic-shaped tensor args (PR #184626)

Jakub Kuderski llvmlistbot at llvm.org
Wed Mar 4 09:51:42 PST 2026


================
@@ -1050,6 +1050,17 @@ struct FuncOpVectorUnroll final : OpRewritePattern<func::FuncOp> {
       return failure();
     }
 
+    // Bail out early for non-vector argument types that cannot have a zero
+    // constant created (e.g., dynamically-shaped tensors), as getZeroAttr
+    // requires a statically-shaped type.
+    for (Type argType : fnType.getInputs()) {
+      if (dyn_cast<VectorType>(argType))
----------------
kuhar wrote:

isa

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


More information about the Mlir-commits mailing list