We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5323627 commit 31803c7Copy full SHA for 31803c7
src/arith/iter_affine_map.cc
@@ -898,6 +898,11 @@ class IterMapRewriter : public ExprMutator {
898
PrimExpr SplitFloorModConst(IterSplitExpr lhs, PrimExpr base, PrimExpr rhs);
899
900
static void AddToLhs(IterSumExprNode* lhs, IterSplitExpr rhs, int sign) {
901
+ if (sign < 0 && is_const_int(rhs->extent, 2)) {
902
+ lhs->base -= rhs->scale;
903
+ sign = 1;
904
+ }
905
+
906
tir::ExprDeepEqual equal;
907
for (size_t i = 0; i < lhs->args.size(); ++i) {
908
IterSplitExpr lvalue = lhs->args[i];
0 commit comments