[compiler-rt] [llvm] [compiler-rt] Use integers for __gnu_h2f_ieee and __gnu_f2h_ieee (PR #220167)
Trevor Gross via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 5 19:21:22 PDT 2026
================
@@ -16,14 +16,16 @@ COMPILER_RT_ABI NOINLINE float __extendhfsf2(src_t a) {
return __extendXfYf2__(a);
}
+// arm32-gnueabi-only routine that always uses the integer ABI. This should be
+// gnueabi-specific, but LLVM currently emits it on more arm platforms.
+COMPILER_RT_ABI uint32_t __gnu_h2f_ieee(uint16_t a) {
+ return dstToRep(__extendXfYf2__(srcFromRep(a)));
----------------
tgross35 wrote:
If your concern is about duplicate codegen, I can change `__gnu_h2f_ieee` to call `__extendhfsf2` like it currently does. I don't see a benefit though: no platform will be linking both of these so there's no binary size cost, and it gives up the (tiny) performance improvement on the platforms that use `__gnu_h2f_ieee`.
https://github.com/llvm/llvm-project/pull/220167
More information about the llvm-commits
mailing list