[Mlir-commits] [mlir] [mlir][IR] Fix bug in AffineExpr simplifier `lhs % rhs` where `lhs = lhs floordiv rhs` (PR #119245)
Kunwar Grover
llvmlistbot at llvm.org
Wed Dec 11 16:16:11 PST 2024
================
@@ -1385,7 +1385,7 @@ LogicalResult SimpleAffineExprFlattener::visitModExpr(AffineBinaryOpExpr expr) {
lhs[getLocalVarStartIndex() + numLocals - 1] = -rhsConst;
} else {
// Reuse the existing local id.
- lhs[getLocalVarStartIndex() + loc] = -rhsConst;
+ lhs[getLocalVarStartIndex() + loc] -= rhsConst;
----------------
Groverkss wrote:
This looked right to me before. Can you add a proper test showing that this is wrong?
https://github.com/llvm/llvm-project/pull/119245
More information about the Mlir-commits
mailing list