[PATCH] D130718: [compiler-rt] [builtins] Detect _Float16 support at compile time

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 30 03:57:40 PDT 2022


pengfei added a comment.

Neither do I. The compiler-rt files and the CMake is a maze to me. For example, we have `truncsfhf2.c/extendhfsf2.c;trunctfhf2.c/extendhftf2.c;truncdfhf2.c` in compiler-rt, but we are missing `__extendhfdf2`, `__truncxfhf2/__extendhfxf2` compared to gcc. Besides, `truncsfhf2.c/extendhfsf2.c/truncdfhf2.c` use `src_t/dst_t` rather than `_Float16` used in `trunctfhf2.c/extendhftf2.c`. I wonder if you can solve your problem by just replacing `_Float16` by `src_t/dst_t`. However, it cannot explain why the buildbot failed only in `truncsfhf2_test.c/truncdfhf2_test.c` while passed in `extendhfsf2_test.c` ...

>From the view point of a general solution, I think we can add `-msse2` for X86 in the CMake. I think forcing it is not a problem given GCC has already implies it as you observed. OTOH, when you using configuration generated for x86_64 for i386 targets, you have acquiesced SSE2 is usable on i386. Otherwise, it is misuse in such scenario.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130718/new/

https://reviews.llvm.org/D130718



More information about the llvm-commits mailing list