[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:33 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:

Why does this warrant an assertion? Could we choose to materialize a different constant?

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


More information about the Mlir-commits mailing list