-
Notifications
You must be signed in to change notification settings - Fork 12k
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
[AArch64] Incorrect register used for inline assembly input #58384
Labels
Comments
Causes an assertion failure:
|
@llvm/issue-subscribers-backend-aarch64 |
Amanieu
added a commit
to Amanieu/rust
that referenced
this issue
Nov 2, 2022
Upstream issue: llvm/llvm-project#58384 LLVM gets confused if we assign a 32-bit value to a 64-bit register, so pass the 32-bit register name to LLVM in that case.
I worked around this in rustc (rust-lang/rust#103897) by renaming the register to |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Nov 4, 2022
asm: Work around LLVM bug on AArch64 Upstream issue: llvm/llvm-project#58384 LLVM gets confused if we assign a 32-bit value to a 64-bit register, so pass the 32-bit register name to LLVM in that case.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With
llc -march=aarch64 -O0
, this generates the following assembly.Using
={x0},{x0}
instead of={x0},0
seems to avoid this issue,This IR is generated by rustc's inline assembly for aninout("x8")
operand, so perhaps this is rustc's fault?Actually I can reproduce this bug in Clang as well, so it's definitely not an issue that is unique to rustc.
The text was updated successfully, but these errors were encountered: