[compiler-rt] [builtins] Use _Float16 on extendhfsf2, truncdfhf2 __truncsfhf2 if...
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 3 Dec 2020 18:29:45 +0000 (15:29 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 3 Dec 2020 19:08:55 +0000 (16:08 -0300)
commitc288715e952fe0e179d645a76b0f518e2403a42b
tree8c44860d6a9a0ad6af43943f19ceac9939f940f6
parent701fa0b5ab04e9aa309cbc30599e9d6ee879e61a
[compiler-rt] [builtins] Use _Float16 on extendhfsf2, truncdfhf2 __truncsfhf2 if available

On AArch64 it allows use the native FP16 ABI (although libcalls are
not emitted for fptrunc/fpext lowering), while on other architectures
the expected current semantic is preserved (arm for instance).

For testing the _Float16 usage is enabled by architecture base,
currently only for arm, aarch64, and arm64.

This re-enabled revert done by https://reviews.llvm.org/rGb534beabeed3ba1777cd0ff9ce552d077e496726

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D92241
12 files changed:
compiler-rt/cmake/builtin-config-ix.cmake
compiler-rt/lib/builtins/CMakeLists.txt
compiler-rt/lib/builtins/extendhfsf2.c
compiler-rt/lib/builtins/fp_extend.h
compiler-rt/lib/builtins/fp_trunc.h
compiler-rt/lib/builtins/truncdfhf2.c
compiler-rt/lib/builtins/truncsfhf2.c
compiler-rt/test/builtins/CMakeLists.txt
compiler-rt/test/builtins/Unit/extendhfsf2_test.c
compiler-rt/test/builtins/Unit/fp_test.h
compiler-rt/test/builtins/Unit/truncdfhf2_test.c
compiler-rt/test/builtins/Unit/truncsfhf2_test.c