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 more simplified 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]