You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/01/18 17:53:56 UTC
[GitHub] [tvm] spectrometerHBH commented on a change in pull request #9941: [TIR] Canonical simplify the intset before region cover proof
spectrometerHBH commented on a change in pull request #9941:
URL: https://github.com/apache/tvm/pull/9941#discussion_r787013464
##########
File path: src/arith/rewrite_simplify.cc
##########
@@ -153,6 +153,16 @@ PrimExpr RewriteSimplifier::Impl::VisitExpr_(const AddNode* op) {
TVM_TRY_REWRITE(max(x, y - z) + z, max(x + z, y));
TVM_TRY_REWRITE(max(x - z, y) + z, max(x, y + z));
+ TVM_TRY_REWRITE(min(c1, x - c2) + c3, min(c1 + c3, x + (c3 - c2)));
Review comment:
These rules look quite ad-hoc to me since in general, I think it would be great to keep common sub expressions out of min/max to avoid duplicate calculation unless it can cancel some items like the rules above `max(x-z, y) + z, max(x, y+z)`.
--
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org