[libcxx-commits] [libcxx] [libcxx] Use `lgamma` rather than `lgamma_r` with LLVM libc (PR #109556)

Joseph Huber via libcxx-commits libcxx-commits at lists.llvm.org
Sat Sep 21 20:10:48 PDT 2024


jhuber6 wrote:

> > But we don't have `lgamma` either for non-GPU targets, so how does this work?
> 
> libc++ provides it's own implementation which uses `__builtin_lgamma`, see:
> 
> https://github.com/llvm/llvm-project/blob/eaedbbc30ded7965f37cfa90149daf308656c299/libcxx/include/__math/gamma.h#L26-L38

`__builtin_lgamma` isn't handled anywhere in the backend AFAIK, it will almost certainly be reduced to an unresolved libcall.

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


More information about the libcxx-commits mailing list