-
Notifications
You must be signed in to change notification settings - Fork 219
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
Run tests with a range of values for inliner_aggressiveness
to test for divergences in behaviour.
#6349
Comments
Investigating... |
I see the issue, it's related with array_set_mut: unconstrained fn main() {
let mut bounded_vec1: BoundedVec<Field, 3> = BoundedVec::new();
let mut bounded_vec2: BoundedVec<Field, 3> = BoundedVec::new();
bounded_vec1.push(1);
bounded_vec2.push(2);
std::println(bounded_vec1.storage());
std::println(bounded_vec2.storage());
}
As you can see in fn push, it's using array_set mut, which ignores reference counters, so it's mutating |
cc @vezenovm |
Good spot! I eyeballed the whole SSA printout top to bottom but missed the I'll open a PR with the test changes to call with/without brillig and various inlining aggressiveness. |
Probably 2 or 3 levels of aggressiveness should be enough (MIN_VALUE, 0, MAX_VALUE). Or MIN_VALUE and MAX_VALUE only if it's too costly |
I'm looking at a fix to the array mut issue. I'm actually surprised to that EDIT: found the bug |
Looking at this it looks like the return block overrules the load 👀 |
Yes that is the issue. It was fine when we inlined everything but not anymore. |
@aakoshh noticed in #6340 that compiling the
trait_eq::inequality
test fails withinliner_aggressiveness = 0
but passes withinliner_aggressiveness = 9223372036854775807
. We would expect that the resultant brillig bytecode should be equivalent but this is not the case.We should update the test suite to run at a number of different levels of inliner aggressiveness to check that we don't get different behaviour presented.
cc @sirasistant as non-inlining behaviour is resulting in correctness issues.
The text was updated successfully, but these errors were encountered: