-
Notifications
You must be signed in to change notification settings - Fork 382
fix: Use IntegerConstant for loop boundaries in unrolling
#8094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
45cafc3
Unit test to show that the generated SSA is wrong
aakoshh bf10be1
Move test into own module
aakoshh 9673e82
Example of the overflow as a test in unrolling
aakoshh 475f0c8
Use i128 in unrolling
aakoshh db8f391
Integration test to show that negative ranges are handled
aakoshh 0b5bf80
Add snapshot
aakoshh b2c510c
Hint at the env var for stdout.txt
aakoshh 0e92d3a
Format Noir test
aakoshh 9cd524c
Add test for non-empty negative range
aakoshh d995444
Merge branch 'master' into af/8009-fix-range-modulo
aakoshh f1299c5
fix: Don't skip for loops with negative literal ranges (#8103)
aakoshh aeb9a9a
Merge remote-tracking branch 'origin/master' into af/8009-fix-range-m…
aakoshh e99a58b
Change magic numbers into formula
aakoshh 6e04f93
Fix insta
aakoshh 24a2021
Merge remote-tracking branch 'origin/master' into af/8009-fix-range-m…
aakoshh a72c5d7
Change the test so it's a non-empty range
aakoshh 2c5dcf6
Change the lower bound so we see the effect of the modulo
aakoshh c2d40fc
Update compiler/noirc_evaluator/src/ssa/ir/integer.rs
aakoshh 5114996
Update compiler/noirc_evaluator/src/ssa/ir/integer.rs
aakoshh fee93d9
Update compiler/noirc_evaluator/src/ssa/ir/integer.rs
aakoshh 0f6a4c4
Update compiler/noirc_evaluator/src/ssa/ir/integer.rs
aakoshh 70a2ec7
Merge branch 'master' into af/8009-fix-range-modulo
aakoshh 34cb742
Allow u128 for loop index in AST fuzzer
aakoshh 6e9f7c9
Fix formatting
aakoshh 6cee3bf
Fix range generator
aakoshh a4b3728
Merge branch 'master' into af/8009-fix-range-modulo
aakoshh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,7 @@ | ||
| [package] | ||
| name = "regression_8009" | ||
| version = "0.1.0" | ||
| type = "bin" | ||
| authors = [""] | ||
|
|
||
| [dependencies] |
This file contains hidden or 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,3 @@ | ||
| start = -51675949543456665 | ||
| end = -1 | ||
| return = 0 |
This file contains hidden or 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,9 @@ | ||
| unconstrained fn main(start: i64, end: i64) -> pub u32 { | ||
| let start = (start % 5); | ||
| let end = (end % 5); | ||
| let mut sum = 0; | ||
| for i in start .. end { | ||
| sum += 1; | ||
| } | ||
| sum | ||
| } |
This file contains hidden or 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 @@ | ||
| [regression_8009] Circuit output: Field(0) |
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.