Lunderberg commented on code in PR #13936:
URL: https://github.com/apache/tvm/pull/13936#discussion_r1124829916
##########
src/arith/rewrite_simplify.cc:
##########
@@ -473,6 +487,9 @@ PrimExpr RewriteSimplifier::Impl::VisitExpr_(const SubNode*
op) {
floordiv(x - y, c1) * c3 - x * c2, (0 - floormod(x - y, c1) - y) * c2,
c1.Eval()->value != 0 && c3.Eval()->value == c1.Eval()->value *
c2.Eval()->value);
+ TVM_TRY_RECURSIVE_REWRITE(floordiv(x + 1, 2) - floormod(x, 2), floordiv(x,
2));
+ TVM_TRY_RECURSIVE_REWRITE(floordiv(x, 2) - floormod(x - 1, 2), floordiv(x
- 1, 2));
Review Comment:
Updated here as well. The related rule on line 490 with `floordiv(x + 1,2)`
is kept, because there isn't an equivalent change to the argument of `floordiv`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]