Commit 3c6f9c9
authored
[Arith] Added simplification rule for multiple equality compares (#15628)
The expression `(x==y) && (x==z)` requires that `y==z`. When `y` and
`z` are constants, this can allow better constant folding by
rewriting `(x==c1) && (x==c2)` into `(x==c1) && (c1==c2)`.
This commit adds the above rewrite, and the corresponding rewrite of
the negative expression.1 parent c921781 commit 3c6f9c9
File tree
2 files changed
+4
-0
lines changed- src/arith
- tests/python/unittest
2 files changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1856 | 1856 | | |
1857 | 1857 | | |
1858 | 1858 | | |
| 1859 | + | |
1859 | 1860 | | |
1860 | 1861 | | |
1861 | 1862 | | |
| |||
2000 | 2001 | | |
2001 | 2002 | | |
2002 | 2003 | | |
| 2004 | + | |
2003 | 2005 | | |
2004 | 2006 | | |
2005 | 2007 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
951 | 951 | | |
952 | 952 | | |
953 | 953 | | |
| 954 | + | |
954 | 955 | | |
955 | 956 | | |
956 | 957 | | |
| |||
965 | 966 | | |
966 | 967 | | |
967 | 968 | | |
| 969 | + | |
968 | 970 | | |
969 | 971 | | |
970 | 972 | | |
| |||
0 commit comments