Skip to content

Register allocation bug with instrinsics #455

Closed
@sarranz

Description

@sarranz

The following fails

export
fn main(reg u64 y) {
    reg u64 x;

    // Commenting either of the following two lines makes compilation succeed.
    x = #MOV(y);  // Using x = y; makes compilation succeed.
    x = 1;

    x = y if x == 0;
    [x] = x;
}

with internal compilation error in function main: Variable allocation: y (defined at "../bug.jazz", line 2 (16-17)) and RDI (defined at "", line -1 (-1)) : variable already set. Removing any of the four instructions makes compilation go through, as well as using an assignment instead of MOV.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions