[Mlir-commits] [mlir] [mlir][affine] remove divide zero check when simplifer affineMap (#64622) (PR #68519)

Jakub Kuderski llvmlistbot at llvm.org
Mon Oct 30 07:57:32 PDT 2023


================
@@ -86,7 +86,8 @@ getFlattenedAffineExprs(ArrayRef<AffineExpr> exprs, unsigned numDims,
     if (!expr.isPureAffine())
       return failure();
 
-    flattener.walkPostOrder(expr);
+    auto flattenResult = flattener.walkPostOrder(expr);
+    assert(succeeded(flattenResult) && "affine expr containts poison expr");
----------------
kuhar wrote:

this will cause unused variable warnings in non-debug builds
```suggestion
    (void)flattenResult;
    assert(succeeded(flattenResult) && "affine expr containts poison expr");
```

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


More information about the Mlir-commits mailing list