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

Register allocation error shows useless wrong line information #1026

Closed
vbgl opened this issue Jan 27, 2025 · 0 comments · Fixed by #1027
Closed

Register allocation error shows useless wrong line information #1026

vbgl opened this issue Jan 27, 2025 · 0 comments · Fixed by #1027

Comments

@vbgl
Copy link
Member

vbgl commented Jan 27, 2025

Compiling the following program (with jasminc 2024.07.2) produces the error message reproduced below. The φ-nodes listed in that message carry a dummy information that should not be displayed.

export fn main(reg u32 x) -> reg u32 {
  reg u32 y = x;
  if x <s 0 {
    y = -x;
  } else {
    y = x;
  }
  x += y;
  return x;
}
"…/bug_1026.jazz", line 3 (2) to line 7 (3):
compilation error:
register allocation: conflicting variables “x.157” and “y.208” must be merged due to:
  at line -1 (-1):
    y.208 = y.206; /* u32:φ */
  at line -1 (-1):
    y.208 = y.207; /* u32:φ */
  at "tests/fail/register_allocation/x86-64/bug_1026.jazz", line 4 (4-11):
    ( _1.201,  _2.202,  _3.203,  _4.204,  _5.205, y.206) =
      #NEG_32(x.157); /*  */
  at "tests/fail/register_allocation/x86-64/bug_1026.jazz", line 8 (2-9):
    ( _6.209,  _7.210,  _8.211,  _9.212,  _10.213, x.214) =
      #ADD_32(x.157, y.208); /*  */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant