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

Kunwar Grover llvmlistbot at llvm.org
Fri Nov 3 13:21:15 PDT 2023


================
@@ -85,8 +85,10 @@ getFlattenedAffineExprs(ArrayRef<AffineExpr> exprs, unsigned numDims,
   for (auto expr : exprs) {
     if (!expr.isPureAffine())
       return failure();
-
-    flattener.walkPostOrder(expr);
+    // has poison expression
+    auto flattenResult = flattener.walkPostOrder(expr);
+    if (failed(flattenResult))
+      return failure();
----------------
Groverkss wrote:

This is a little weird... Failure on flattening usually means it's semi-affine.  Could you update the documentation for this function?

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


More information about the Mlir-commits mailing list