jasmin
jasmin copied to clipboard
Register allocation and ?{} syntax
This program
export
fn main(reg u64 x) -> reg u64 {
reg bool lt;
?{ "<u" = lt } = #CMP(x, 10);
while (lt) {
x += 2;
?{ "<u" = lt } = #CMP(x, 10);
}
x = x;
return x;
}
gives compilation error: register allocation: variables { lt.238; lt.226 } remain unallocated, but if we change one (or both) of the ?{ } operators by _, lt, _, _, _ then it compiles correctly.
Did you try to replace "reg bool lt" by "inline bool lt" ?
No, because it triggers #478.