This is an updated version of https://reviews.llvm.org/D50685 .
The main changes are that
- I have added a CMake test to check if compiler support _Float16 to avoid either to require a more recent gcc to build a stage1 compiler and avoid creating potentially invalid soft-fp symbols (as for ARM fp16 one when built with a compiler configured for hard-float).
- Adjusted the internal tests to use _Float16 as well if compiler supports.
This issue has been brought by some developer from Apache TVM, where is
trigger an compiler ICE with the missing fp conversion.
This patch adds both extendhftf2 and trunctfhf2 to support
conversion between half-precision and quad-precision floating-point
values. They are enabled iff the compiler supports _Float16.
It also adjust the extendhfsf2, truncdfhf2 __truncsfhf2 to use
_Float16 when compiler supports it. On AArch64 it allows use the
native FP16 ABI, while on other architectures the expected current
semantic is preserved (arm for instance).
clang-tidy: warning: invalid case style for function '__extendhfsf2' [readability-identifier-naming]
not useful
clang-tidy: warning: invalid case style for parameter 'a' [readability-identifier-naming]
not useful