-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ssa refactor): acir-gen for
NOT
instruction (#1450)
* add field mul and div * add code to process field mul and div * add assert example * add `is_equal` constraint * add `eq_var` method for AcirVar * process `Constrain` instruction and BinaryOp::Eq * add TODO for more than the maximum number of bits * add numeric_cast_var method which constrains a variable to be equal to a NumericType * implement casting for numeric types * add simple range constraint example * add constraints for `more_than_eq` * - add more_than_eq method - This method needs to know the bit size, so we cache this information whenever we do a range constraint. We should ideally also cache it for constants too since we can figure out their bit-sizes easily * add method to process less than binary operation * add example * assign result of cast operation * add `y` as an input value * return optimized circuit * Addressed in Address GtEq extra opcodes #1444 * chore(ssa refactor): acir-gen for ! instruction * inline function * Update crates/noirc_evaluator/src/ssa_refactor/acir_gen/acir_ir/acir_variable.rs * Update crates/noirc_evaluator/src/ssa_refactor/acir_gen/acir_ir/acir_variable.rs * chore(ssa refactor): return acir var/result pair for binding --------- Co-authored-by: Kevaundray Wedderburn <[email protected]>
- Loading branch information
1 parent
eae624b
commit 9c05a24
Showing
5 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
crates/nargo_cli/tests/test_data_ssa_refactor/simple_not/Nargo.toml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[package] | ||
authors = [""] | ||
compiler_version = "0.6.0" | ||
|
||
[dependencies] |
1 change: 1 addition & 0 deletions
1
crates/nargo_cli/tests/test_data_ssa_refactor/simple_not/Prover.toml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
x = false |
4 changes: 4 additions & 0 deletions
4
crates/nargo_cli/tests/test_data_ssa_refactor/simple_not/src/main.nr
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// A simple program for testing the NOT op | ||
fn main(x : bool) -> pub bool { | ||
!x | ||
} |
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