-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: simplify explicit equality assertions to assert equality direct…
…ly (#3708) # Description ## Problem\* Resolves <!-- Link to GitHub Issue --> ## Summary\* This PR adds 3 optimisations. 1. `x < 1` gets rewritten as `x == 0` for unsigned values of `x` (as this is the only value for which `x < 1` can be true) 2. constraining the result of an equality to be true gets rewritten as asserting this equality directly. 3. constraining the result of a boolean NOT gets rewritten to be in terms of the original value. ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[Exceptional Case]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --------- Co-authored-by: kevaundray <kevtheappdev@gmail.com>
- Loading branch information
1 parent
028d65e
commit 2fc46e2
Showing
1 changed file
with
77 additions
and
6 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