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

Another RVSDG conversion bug #454

Open
glenn-sun opened this issue Apr 13, 2024 · 0 comments
Open

Another RVSDG conversion bug #454

glenn-sun opened this issue Apr 13, 2024 · 0 comments

Comments

@glenn-sun
Copy link
Collaborator

Minimal example:

@main {
    num: int = const 12;
    ans: int = call @loop_with_early_ret num;
    print ans;
}

@loop_with_early_ret(n: int): int {
    f: bool = const false;
.loop:
    br f .break .continue;
.break:
    ret n;
.continue:
    br f .loop .done;
.done:
    ret n;
}

RVSDG output looks like this:
test

Round trip is an error:

thread 'main' panicked at src/rvsdg/to_cfg.rs:285:46:
index out of bounds: the len is 2 but the index is 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant