[compiler-rt][BF16] Provide __truncsfbf2 only when __bf16 is available
authorPhoebe Wang <phoebe.wang@intel.com>
Wed, 10 Aug 2022 01:13:27 +0000 (09:13 +0800)
committerPhoebe Wang <phoebe.wang@intel.com>
Wed, 10 Aug 2022 01:13:44 +0000 (09:13 +0800)
commit0ae2a41d803d715975d710ec289a4bd90ca534e2
tree179b5a23aec38568dedbb9837e1c62ae561cc9e1
parente4888a37d36780872d685c68ef8b26b2e14d6d39
[compiler-rt][BF16] Provide __truncsfbf2 only when __bf16 is available

#56854 shows a backwards compatibility problem when builtins of compiler-rt don't follow ABI. We need to prevent to fall into the trap again for BF16.

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D131147
compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
compiler-rt/cmake/builtin-config-ix.cmake
compiler-rt/lib/builtins/CMakeLists.txt
compiler-rt/lib/builtins/fp_trunc.h
compiler-rt/lib/builtins/truncsfbf2.c