Open Amanieu opened 2 years ago
Causes an assertion failure:
X0 = COPY W8
unimplemented reg-to-reg copy
@llvm/issue-subscribers-backend-aarch64
I worked around this in rustc (https://github.com/rust-lang/rust/pull/103897) by renaming the register to wN
instead of xN
if the type is 32-bit or smaller. Perhaps this should be solved in the frontend in Clang?
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 anActually I can reproduce this bug in Clang as well, so it's definitely not an issue that is unique to rustc.inout("x8")
operand, so perhaps this is rustc's fault?