-
Notifications
You must be signed in to change notification settings - Fork 409
fix(ssa): Do not use inner else condition when collapsing IfElse based upon the then condition #8040
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
fix(ssa): Do not use inner else condition when collapsing IfElse based upon the then condition #8040
Changes from 4 commits
a6939db
6eb3f40
faa5380
bccc61d
cd6fc16
a04008f
e880d6a
43bb1be
ec49901
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| [package] | ||
| name = "nested_if_then_block_same_cond" | ||
| type = "bin" | ||
| authors = [""] | ||
|
|
||
| [dependencies] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| a = 0 | ||
| b = [[1, 0], [1, 0], [1, 1]] | ||
|
|
||
| return = [1, 0] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // Regression taken from issue #7961 (https://github.com/noir-lang/noir/issues/7961) | ||
| fn main(a: bool, b: [[bool; 2]; 3]) -> pub [bool; 2] { | ||
| if (!!a) { | ||
| if (!!a) { | ||
| b[0] | ||
| } else { | ||
| b[0] | ||
| } | ||
| } else { | ||
| b[0] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| [nested_if_then_block_same_cond] Circuit output: Vec([Field(1), Field(0)]) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.