[compiler-rt] [llvm] Add extendhfxf2 into compiler rt (PR #111099)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 26 01:08:09 PDT 2024
mstorsjo wrote:
The updated testcase here still fails on Windows in MinGW configurations: https://github.com/mstorsjo/llvm-mingw/actions/runs/11527502938/job/32098789138
```
# .---command stderr------------
# | D:\a\llvm-mingw\llvm-mingw\llvm-project\compiler-rt\test\builtins\Unit\extendhfxf2_test.c:14:3: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
# | 14 | __uint16_t *b = (void *)&a;
# | | ^~~~~~~~~~
# | | __uint128_t
# | note: '__uint128_t' declared here
# | D:\a\llvm-mingw\llvm-mingw\llvm-project\compiler-rt\test\builtins\Unit\extendhfxf2_test.c:19:12: warning: format specifies type 'unsigned int' but the argument has type '__uint128_t' (aka 'unsigned __int128') [-Wformat]
# | 17 | printf("error in test__extendhfxf2(%#.4x) = %.20Lf, "
# | | ~~~~~
# | 18 | "expected %.20Lf\n",
# | 19 | *b, x, expected);
# | | ^~
# | D:\a\llvm-mingw\llvm-mingw\llvm-project\compiler-rt\test\builtins\Unit\extendhfxf2_test.c:48:49: error: use of unknown builtin '__builtin_huge_valf64x' [-Wimplicit-function-declaration]
# | 48 | if (test_extendhfxf2(__builtin_huge_valf16(), __builtin_huge_valf64x()))
# | | ^
# | D:\a\llvm-mingw\llvm-mingw\llvm-project\compiler-rt\test\builtins\Unit\extendhfxf2_test.c:58:37: error: use of unknown builtin '__builtin_nanf64x' [-Wimplicit-function-declaration]
# | 58 | (long double)__builtin_nanf64x("")))
# | | ^
# | 1 warning and 3 errors generated.
# `-----------------------------
```
While sorting this out, can you revert in the meantime?
We'd need to figure out which targets have a builtin type like `__uint16_t` and which don't (or can we just use `uint16_t` by including `stdint.h`? And which targets have `__builtin_huge_valf64x` and `__builtin_nanf64x` - as they're not available for mingw targets at least.
https://github.com/llvm/llvm-project/pull/111099
More information about the llvm-commits
mailing list