forked from OSchip/llvm-project
Revert "Reland "[compiler-rt][BF16] Provide __truncsfbf2 only when __bf16 is available""
This reverts commit ab4e5ed441
since it
causes a build failure on macOS:
https://green.lab.llvm.org/green/job/lldb-cmake/45984/
This commit is contained in:
parent
dc55ab3840
commit
5990cf3806
|
@ -406,8 +406,6 @@ macro(darwin_add_builtin_libraries)
|
|||
|
||||
append_list_if(COMPILER_RT_HAS_ASM_LSE -DHAS_ASM_LSE CFLAGS)
|
||||
|
||||
append_list_if(COMPILER_RT_HAS_BFLOAT16 -DCOMPILER_RT_HAS_BFLOAT16 CFLAGS)
|
||||
|
||||
set(PROFILE_SOURCES ../profile/InstrProfiling.c
|
||||
../profile/InstrProfilingBuffer.c
|
||||
../profile/InstrProfilingPlatformDarwin.c
|
||||
|
|
|
@ -30,14 +30,6 @@ _Float16 foo(_Float16 x) {
|
|||
"
|
||||
)
|
||||
|
||||
builtin_check_c_compiler_source(COMPILER_RT_HAS_BFLOAT16
|
||||
"
|
||||
__bf16 foo(__bf16 x) {
|
||||
return x;
|
||||
}
|
||||
"
|
||||
)
|
||||
|
||||
builtin_check_c_compiler_source(COMPILER_RT_HAS_ASM_LSE
|
||||
"
|
||||
asm(\".arch armv8-a+lse\");
|
||||
|
|
|
@ -699,8 +699,6 @@ else ()
|
|||
|
||||
append_list_if(COMPILER_RT_HAS_FLOAT16 -DCOMPILER_RT_HAS_FLOAT16 BUILTIN_CFLAGS)
|
||||
|
||||
append_list_if(COMPILER_RT_HAS_BFLOAT16 -DCOMPILER_RT_HAS_BFLOAT16 BUILTIN_CFLAGS)
|
||||
|
||||
append_list_if(COMPILER_RT_HAS_STD_C11_FLAG -std=c11 BUILTIN_CFLAGS)
|
||||
|
||||
# These flags would normally be added to CMAKE_C_FLAGS by the llvm
|
||||
|
|
|
@ -60,7 +60,7 @@ typedef uint16_t dst_rep_t;
|
|||
static const int dstSigBits = 10;
|
||||
|
||||
#elif defined DST_BFLOAT
|
||||
typedef __bf16 dst_t;
|
||||
typedef uint16_t dst_t;
|
||||
typedef uint16_t dst_rep_t;
|
||||
#define DST_REP_C UINT16_C
|
||||
static const int dstSigBits = 7;
|
||||
|
|
|
@ -6,11 +6,8 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#if defined(COMPILER_RT_HAS_BFLOAT16)
|
||||
#define SRC_DOUBLE
|
||||
#define DST_BFLOAT
|
||||
#include "fp_trunc_impl.inc"
|
||||
|
||||
COMPILER_RT_ABI dst_t __truncdfbf2(double a) { return __truncXfYf2__(a); }
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,11 +6,8 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#if defined(COMPILER_RT_HAS_BFLOAT16)
|
||||
#define SRC_SINGLE
|
||||
#define DST_BFLOAT
|
||||
#include "fp_trunc_impl.inc"
|
||||
|
||||
COMPILER_RT_ABI dst_t __truncsfbf2(float a) { return __truncXfYf2__(a); }
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue