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

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 28 19:18:44 PDT 2022


pengfei added a subscriber: kparzysz.
pengfei added a comment.

@kparzysz reminded me. This is not the right direction to solve the problem. The ABI of runtime libraries should be constant rather than changing with different features. Imagining a program may be built with or without `SSE2` and linked with the same runtime. Another problem is compatibility with libgcc. Using `uint16_t` is not compatible with libgcc anymore.

Fortunately, LLVM codegen (unfortunately Darwin isn't) was using `__gnu_h2f_ieee/__gnu_f2h_ieee` before the change https://godbolt.org/z/GnrT5vGr1. So an easy way to solve the problem is always assign `-msse2` when build `extendhftf2/trunctfhf2`.

I have a patch D128872 <https://reviews.llvm.org/D128872> for Darwin targets, I hope we can put it into the 15.x release.


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