On Thu, May 01, 2025 at 08:09:18AM +0000, Kyrylo Tkachov wrote: > > I was going to ask why not use the standard __buuiltin_sqrt builtins but I > guess those don’t guarantee that we avoid a libcall in all cases. > So this is ok. >
Yes, __builtin_sqrt will generate calls to sqrt(3) with default compiler flags. Only with -fno-math-errno, or -ffast-math, __builtin_sqrt will generate sqrt instruction. Therefore, a new instruction was added in Aarch64's GCC backend to avoid libc call for sqrt(3). > > Do you want me to push the patches for you? > Yes, please. Thank you very much for the support and feedback. Best Regards, Ayan