A previous patch changed calling conversion of half type from GPRs to XMMs. This patch is to enable the
_Float16 type support in Clang.
In theory, it won’t result in tests fail in compiler-rt because we firstly check if the
_Float16 is supported on the target by cmake: https://github.com/llvm/llvm-project/blob/main/compiler-rt/cmake/builtin-config-ix.cmake#L25-L31 and switch the ABI accordingly: https://github.com/llvm/llvm-project/blob/527ef8ca981e88a35758c0e4143be6853ea26dfc/compiler-rt/test/builtins/CMakeLists.txt#L47-L50.
Before this patch,
_Float16 in not supported by Clang. Thus, both compiler-rt and the tests are using GPR conversion. And after the patch, both will use XMM conversion.
It works well on Linux, but it fails on Darwin because (AFAIU) the native Clang on Darwin supports
_Float16 even without this patch. So it will generate compiler-rt with GPR conversion while the tests expect the conversion is XMM.
I’m not very sure of my suspicion. The problem is I neither am expert in compiler-rt nor have Darwin environment. Does any folks have suggestion on how to solve the problem? Thanks in advance!