-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove unnecessary predicate from
Lt
instruction (#3922)
# Description ## Problem\* Resolves <!-- Link to GitHub Issue --> ## Summary\* This PR removes the predicate from the ACIR codegened from `Instruction::Lt`. I think this predicate got added as a knee-jerk reaction to there being divisions involved however all these divisions are done with a known non-zero constant divisor so we can always perform the division safely. This fixes a discrepancy as we're applying `current_side_effects_enabled_var` despite https://github.com/noir-lang/noir/blob/aabe5c15bc9d509e6953e689a5f479b26b972384/compiler/noirc_evaluator/src/ssa/ir/instruction.rs#L263-L273 stating that `Lt` not having side effects. As a bonus we can benefit from optimisations in acir gen. ## 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.
- Loading branch information
1 parent
e58844d
commit a63433f
Showing
2 changed files
with
22 additions
and
37 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