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

via libc-commits libc-commits at lists.llvm.org
Tue Apr 8 10:55:06 PDT 2025


lntue 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

By incorrect, you mean not respecting the errno requirements (sometime) then yes, I think that's the current behavior.  And it needs to be fixed and clean up a bit.  I'll need to separate fma used for complete fma functions, and fma used for internal computations.  Right now they are a bit mixing with each other.

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


More information about the libc-commits mailing list