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


##########
src/arith/rewrite_simplify.cc:
##########
@@ -1698,6 +1700,11 @@ PrimExpr RewriteSimplifier::Impl::ApplyRewriteRules(EQ 
ret) {
     TVM_TRY_REWRITE(c1 - x == c2, x == c1 - c2);
     TVM_TRY_REWRITE(x + c1 == c2, x == c2 - c1);
     TVM_TRY_RECURSIVE_REWRITE(x * y == 0, x == 0 || y == 0);
+    TVM_TRY_REWRITE(x == x, ctrue);
+  } else {

Review Comment:
   Good point, and I'll add a comment on it.  In general, the numeric 
simplifications assume that the values are neither `NaN` nor `Inf`, and that 
expressions do not rely on integer overflow for correctness.  That is, integer 
types and floating-point types are simplified as if they are mathematical 
integer/real numbers, rather than IEEE floats.



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