-
Notifications
You must be signed in to change notification settings - Fork 213
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
Test references
fails with inliner = -Inf and brillig
#6443
Comments
To minimise the SSA size the program has been reduced to the following:
Running it with the following command: cargo run -q -p nargo_cli -- --program-dir . execute --force --force-brillig --inliner-aggressiveness -9223372036854775808 --show-ssa The initial SSA is this:
And the final form:
Somehow the Going down the passes in the full printout we can see that this happens
In our case that means:
However the subsequent use of v2 is not redundant, it should be replaced with storing the field in v1, or perhaps v0. |
NB if we run the program with 0 aggressiveness:
Then everything gets inlined and eliminated, including the assertions.
|
As an experiment we can change the test code to remove the outer
In this case the SSA of the helper becomes simpler by writing directly to the
However after the
I'll add a new test for this. 👉 Perhaps something similar to #6355 can be done where we remember that this reference came from a block parameter, and therefore it cannot be eliminated because it might be shared with the caller. Just for the record, with
|
Aim
Trying to run
test_programs
with different--inliner-aggressiveness
in #6429Expected Behavior
Tests under
execution_success
should work.Bug
To Reproduce
cd test_programs/execution_success/references
nargo execute --force --force-brillig --inliner-aggressiveness -9223372036854775808
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
nargo version = 0.36.0 noirc version = 0.36.0+2f0cb3e80f3d93a1dee77fffacc397811e300257 (git version hash: 2f0cb3e, is dirty: false)
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: