[Mlir-commits] [mlir] [mlir][tosa] Prevent div by 0 in ReshapeOp::inferReturnTypeComponents (PR #83823)

Georgios Pinitas llvmlistbot at llvm.org
Wed Jan 22 05:26:23 PST 2025


================
@@ -936,8 +936,12 @@ LogicalResult tosa::ReshapeOp::inferReturnTypeComponents(
 
   // Determine the length of the dynamic dimension.
   for (auto &val : newShapeValue) {
-    if (ShapedType::isDynamic(val))
+    if (ShapedType::isDynamic(val)) {
+      if (staticMul == 0) {
----------------
GeorgeARM wrote:

Can `staticMul` be 0?

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


More information about the Mlir-commits mailing list