lntue wrote: > I've created an issue for planning out the LLVM-libc + clang code sharing > (#114109). That being said I think FMA might be fine to implement within > clang, due to its simplicity. Additionally, LLVM-libc may call > `__builtin_fma`: > https://github.com/llvm/llvm-project/blob/main/libc/src/__support/FPUtil/FMA.h#L32 > > CC: @lntue
On a side note, a completely correct FMA without hardware support is not straightforward, especially when the wider floating point type for intermediate computations is not available. LLVM libc uses `__builtin_fma` only when there is hardware support in order to get both fma instructions generated and compiler optimization support, since the latter one does not work so well with inline assembly. https://github.com/llvm/llvm-project/pull/113020 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits