Skip to content

Incorrect Temp variable elimination #298

@cardillan

Description

@cardillan

The Temp variable elimination may incorrectly remove some instructions:

external(cell1[0]) x;
external(cell1[1]) y;

inline void foo(ref a, in out b)
    a++;
    b++;
end;

foo(ref x, out y);

compiles to

read *tmp4 cell1 0
op add *tmp0 *tmp4 1
write *tmp0 cell1 0
op add :foo:b :foo:b 1
write :foo:b cell1 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingoptimizerRelated to the code optimizer

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions