Skip to content
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

Array elements orphaned in loop unrolling #1688

Closed
joss-aztec opened this issue Jun 14, 2023 · 1 comment · Fixed by #1717 or #1741
Closed

Array elements orphaned in loop unrolling #1688

joss-aztec opened this issue Jun 14, 2023 · 1 comment · Fixed by #1717 or #1741
Labels
bug Something isn't working refactor ssa

Comments

@joss-aztec
Copy link
Contributor

Aim

The test named merkle_insert should compile

Expected Behavior

^

Bug

It errors:

The application panicked (crashed).
Message:  internal error: entered unreachable code: ICE: Id(20) should have been in cache Param { block: Id(6), position: 0, typ: Numeric(NativeField) }
Location: crates/noirc_evaluator/src/ssa_refactor/acir_gen/mod.rs:345

It appears there's no definition of v20 after loop unrolling - formally it was defined as a block parameter.

After Inlining:
...
  b6(v20: Field, v21: Field):
    v26 = call pedersen([v20, v21], u32 0)
After Unrolling:
...
  b607(v42348: Field, v42349: Field):
    v42350 = call pedersen([v20, v21], u32 0)

To Reproduce

Installation Method

None

Nargo Version

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@joss-aztec joss-aztec added the bug Something isn't working label Jun 14, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Jun 14, 2023
@joss-aztec
Copy link
Contributor Author

Test named simple_shield also affected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working refactor ssa
Projects
Archived in project
1 participant