[libc-commits] [libc] [llvm] [libc] Extend fputil::sqrt to use floating point instructions for arm32. (PR #134499)

Mikhail R. Gadelha via libc-commits libc-commits at lists.llvm.org
Tue Apr 8 09:10:21 PDT 2025


mikhailramalho wrote:

> > Does it have to be element wise? Isn't this only required if the argument is a vector?
> 
> Yes, `__builtin_sqrt` is whatever GNU decided it to do, which implies some standard handling. `__builtin_elementwise_sqrt` is more straightforward and type generic.

I was talking with Tue yesterday about this. Does it mean that the FMA implementation is incorrect?

I see we also have a `LIBC_ADD_FNO_MATH_ERRNO` cmake flag to prevent the compiler to generate extra code for the non-elementwise version of the builtin

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


More information about the libc-commits mailing list