Commit bcc0e1d
committed
[TIR] Modify IntImmNode deep_equal to match regardless of type
This patch makes a small change to compare the values of IntImmNode to
see if they're equal when performing a deep_equal of expressions. This
is to try and align it with how the [`PEqualChecker<IntImm>`](https://github.com/apache/tvm/blob/b2204ae6988c7745ea9736340ccd900bc21ae821/src/arith/pattern_match.h#L166)
works where we only compare the values if both are IntImm.
This caused some simplifications to be inconsistent based on whether we
used IntImmNode or PrimExpr to pass an integer between different passes,
and it seemed to make more sense to say that if the values are equal,
then we can conclude the immediates are equal.1 parent b2204ae commit bcc0e1d
File tree
2 files changed
+3
-1
lines changed- src/tir/analysis
- tests/python/tir-analysis
2 files changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
0 commit comments