Lunderberg commented on code in PR #13936:
URL: https://github.com/apache/tvm/pull/13936#discussion_r1124828826


##########
src/arith/rewrite_simplify.cc:
##########
@@ -278,10 +278,16 @@ PrimExpr RewriteSimplifier::Impl::VisitExpr_(const 
AddNode* op) {
     TVM_TRY_REWRITE_IF(floordiv(floormod(x, c2) + c1, c2) + floordiv(x, c2), 
floordiv(x + c1, c2),
                        c2.Eval()->value > 0);
 
+    TVM_TRY_REWRITE(floormod(x + 1, 2) + floormod(x, 2), OneWithTypeLike(x));

Review Comment:
   Good point, and removed.  Testing, it gets the same simplification by first 
applying the rule on line 289, then 264.



-- 
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]

Reply via email to