Open beetrees opened 1 month ago
@llvm/issue-subscribers-backend-x86
Author: None (beetrees)
We don't have instructions to load/store half
to xmm
registers. Likely, we use GPR too when x87
is not usable https://godbolt.org/z/TE8c99aTK. The only problem is we should diagnose for them, I have a proposal to verify ABI, see #111690.
We don't have instructions to load/store
half
toxmm
registers.
AFAIK, the movss
instruction is available when only sse
is enabled and can be used to load and store values to and from xmm0
via the stack.
We don't have instructions to load/store
half
toxmm
registers.AFAIK, the
movss
instruction is available when onlysse
is enabled and can be used to load and store values to and fromxmm0
via the stack.
If you mean by transiting through stack for each load/store, yes, we can do it in this way, but it's not worth the complexity. SSE was designed for float type only, even double is not supported without SSE2, not to mention half. Both GCC and LLVM error out for this https://godbolt.org/z/TE8c99aTK. Other front end should follow in the same way.
Both GCC and LLVM error out for this https://godbolt.org/z/TE8c99aTK
This doesn't show any error?
Both GCC and LLVM error out for this https://godbolt.org/z/TE8c99aTK
This doesn't show any error?
Sorry, here is the right link https://godbolt.org/z/GYETdPaEe
Consider the following IR (compiler explorer):
The 32-bit x86 ABI for returning
half
is specified as using thexmm0
register. As bothonly_sse
andsse_and_sse2
have SSE registers available, they should both be able to use the specified ABI. However, LLVM currently only compilessse_and_sse2
correctly, withonly_sse
incorrectly returning thehalf
ineax
instead.