[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)
Ulrich Weigand via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 8 03:42:36 PST 2025
uweigand wrote:
> * However, if I removed the check for COMPILER_RT_HAS_FLOAT16 in the source files, it builds. Not sure why/if that is needed there (there is no check for it in e.g. extendhfdf2.c), or how it could be set.
This is set if the host compiler used to build compiler-rt supports the `_Float16` type, see this in `compiler-rt/lib/builtins/CMakeLists.txt`:
```
check_c_source_compiles("_Float16 foo(_Float16 x) { return x; }
int main(void) { return 0; }"
COMPILER_RT_HAS_${arch}_FLOAT16)
```
If this is not set, you need to figure out why it is not using the correct host compiler. I think it should be using the clang built from the same sources, which *should* now support `_Float16` - if it doesn't, this may cause other problems, potentially even explaining the wrong results you're seeing.
https://github.com/llvm/llvm-project/pull/109164
More information about the cfe-commits
mailing list