forked from apache/tvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TIR][Arith] Avoid assigning range of possible values to integers (ap…
…ache#11859) Previously, in `ConstIntBoundAnalyzer`, entering a conditional such as `if 2==0` could result in the expression `2` being treated as having a known value of zero within the body of the conditional. Evaluating the range of expressions using `2` in the body of the conditional could result in exceptions being thrown, such as evaluating `expr / 2` while setting `2` to its maximum value of zero. This issue was present for conditions with inequalities for some time, but was introduced for conditions with equalities in apache#11524. Both types are resolved in this PR.
- Loading branch information
1 parent
5946d7c
commit 88452ad
Showing
2 changed files
with
76 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters