[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

Ulrich Weigand via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 5 07:13:37 PST 2025


uweigand wrote:

I think that compiler-rt should provide all six conversion routines (f16<->f32, f16<->f64, f16<->f128), simply because libgcc has them and GCC-generated code will use them, and compiler-rt is supposed to be usable as drop-in replacement.

Also, I think LLVM should ideally generate calls to all those six routines, like GCC does.  Not only is this probably the most efficient (the f16<->f32 and f16<->f64 routines should be pretty much equal in performance), but more importantly, in the truncate case, using only a single truncation is more exact due to avoiding double-rounding effects.

https://github.com/llvm/llvm-project/pull/109164


More information about the cfe-commits mailing list