[Mlir-commits] [mlir] [mlir][affine] fix the issue of ceildiv-mul-ceildiv form expression n… (PR #111254)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Oct 6 23:40:08 PDT 2024


================
@@ -406,12 +419,25 @@ static bool isDivisibleBySymbol(AffineExpr expr, unsigned symbolPos,
     AffineBinaryOpExpr binaryExpr = cast<AffineBinaryOpExpr>(expr);
     if (opKind != expr.getKind())
       return false;
-    return isDivisibleBySymbol(binaryExpr.getLHS(), symbolPos, expr.getKind());
+    if (llvm::any_of(visitedExprs, [](auto expr) {
----------------
lipracer wrote:

`a / b / s0 <=> a / s0 / b`. If `a` is a multiple of `s0`, we can simplify a. but if (a / b) * d / s0 does not hold.


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


More information about the Mlir-commits mailing list