[libc-commits] [PATCH] D156263: [libc][libm][GPU] Populated libmgpu.a with both built-in, HIP Math, and CUDA Math functions
Anton Rydahl via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Aug 14 10:13:19 PDT 2023
AntonRydahl added a comment.
In D156263#4585589 <https://reviews.llvm.org/D156263#4585589>, @arsenm wrote:
> In D156263#4585570 <https://reviews.llvm.org/D156263#4585570>, @arsenm wrote:
>
>> In D156263#4585564 <https://reviews.llvm.org/D156263#4585564>, @jhuber6 wrote:
>>
>>> @arsenm Do we support things like `__builtin_atanf`? IIRC all the builtins for things like `sin` and `sinf` were kind of broken and shouldn't be used.
>>
>> No, there's no underlying llvm intrinsic for atan, it's essentially an alias for the libcall only. llvm.sin and llvm.cos do exist but are just codegened in a fast math way only
>
> In an ideal world we would define the platform and provide the libm functions through the builtins, but that wouldn't be provided by the backend
I think there are actually only 37 of the built-ins in this commit that produce correct results. But I had to add wrappers for them all to test which ones were correct.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156263/new/
https://reviews.llvm.org/D156263
More information about the libc-commits
mailing list