summaryrefslogtreecommitdiff
path: root/mlir/lib/IR/AffineExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/IR/AffineExpr.cpp')
-rw-r--r--mlir/lib/IR/AffineExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/IR/AffineExpr.cpp b/mlir/lib/IR/AffineExpr.cpp
index 2291d64c50a5..59df0cd6833d 100644
--- a/mlir/lib/IR/AffineExpr.cpp
+++ b/mlir/lib/IR/AffineExpr.cpp
@@ -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;
}
return success();
}