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

[GlobalISel] Unable to translate callbr to asm goto label #110541

Open
agostonrobert opened this issue Sep 30, 2024 · 0 comments
Open

[GlobalISel] Unable to translate callbr to asm goto label #110541

agostonrobert opened this issue Sep 30, 2024 · 0 comments

Comments

@agostonrobert
Copy link
Contributor

Reproducer: https://godbolt.org/z/9joYWTbW4

The following C code:

int foo(int count) {
  asm goto ("b %l[stop]" :::: stop);
  return count;
stop:
  return 0;
}

compiled for any global isel target (after adapting the jump instruction), produces the error:

fatal error: error in backend: unable to translate instruction: callbr (in function: foo)

Dumping the passes shows the input instruction:

  callbr void asm sideeffect "b ${0:l}", "!i"() #1
          to label %3 [label %2], !dbg !20, !srcloc !21

Works fine with SelectionDAG (or GCC).

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

No branches or pull requests

2 participants