Skip to content

Another RVSDG conversion bug #454

@glenn-sun

Description

@glenn-sun

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions