[PATCH] D130718: [compiler-rt] [builtins] Detect _Float16 support at compile time
Dimitry Andric via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 10:58:46 PDT 2022
dim created this revision.
dim added reviewers: atrosinenko, bryanpkc, MaskRay, ostannard, pengfei, zatrazz.
Herald added subscribers: Enna1, StephenFan, mgorny, dberris.
Herald added a project: All.
dim requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
Instead of detecting `_Float16` support at CMake configuration time,
detect it at compile time by checking for the predefined (by the
compiler) macro `__FLT16_MAX__` instead.
This solves the issue where compiler-rt is built simultaneously for both
x86_64 and i386 targets, and the CMake configuration uses x86_64
compilation to detect `_Float16` support, while it may not be supported
by the i386 target (if it does not have SSE2).
While here, rename `COMPILERT_RT_HAS_FLOAT16` to `CRT_HAS_FLOAT16`, to
conform more to the naming style used in `int_lib.h` and `int_types.h`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130718
Files:
compiler-rt/cmake/builtin-config-ix.cmake
compiler-rt/lib/builtins/CMakeLists.txt
compiler-rt/lib/builtins/extendhftf2.c
compiler-rt/lib/builtins/fp_extend.h
compiler-rt/lib/builtins/fp_trunc.h
compiler-rt/lib/builtins/int_types.h
compiler-rt/lib/builtins/trunctfhf2.c
compiler-rt/test/builtins/CMakeLists.txt
compiler-rt/test/builtins/Unit/extendhftf2_test.c
compiler-rt/test/builtins/Unit/fp_test.h
compiler-rt/test/builtins/Unit/trunctfhf2_test.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130718.448386.patch
Type: text/x-patch
Size: 6520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220728/b9b52958/attachment.bin>
More information about the llvm-commits
mailing list