[libc-commits] [PATCH] D152603: [libc] Add math functions to AMD/NVPTX libm

Ethan Luis McDonough via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Jun 21 02:37:08 PDT 2023


elmcdonough updated this revision to Diff 533188.
elmcdonough retitled this revision from "[libc] Add F32 inverse trig functions to AMD/NVPTX libm" to "[libc] Add math functions to AMD/NVPTX libm".
elmcdonough edited the summary of this revision.
elmcdonough added a reviewer: sivachandra.
elmcdonough added a comment.

I have been able to confirm that this patch builds and that each builtin function collapses to an LLVM intrinsic.

That said, when I compile the individual cpp files with llc, I do get an issue related to `cos` in the `'AMDGPU DAG->DAG Pattern Instruction Selection'` pass.  Not sure if this is specific to my setup or if cos needs to be a vendor function.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152603/new/

https://reviews.llvm.org/D152603

Files:
  libc/config/gpu/entrypoints.txt
  libc/src/math/gpu/CMakeLists.txt
  libc/src/math/gpu/ceil.cpp
  libc/src/math/gpu/ceilf.cpp
  libc/src/math/gpu/ceill.cpp
  libc/src/math/gpu/copysign.cpp
  libc/src/math/gpu/copysignf.cpp
  libc/src/math/gpu/copysignl.cpp
  libc/src/math/gpu/cos.cpp
  libc/src/math/gpu/cosf.cpp
  libc/src/math/gpu/exp2f.cpp
  libc/src/math/gpu/expf.cpp
  libc/src/math/gpu/fabs.cpp
  libc/src/math/gpu/fabsf.cpp
  libc/src/math/gpu/fabsl.cpp
  libc/src/math/gpu/floor.cpp
  libc/src/math/gpu/floorf.cpp
  libc/src/math/gpu/floorl.cpp
  libc/src/math/gpu/fma.cpp
  libc/src/math/gpu/fmaf.cpp
  libc/src/math/gpu/fmax.cpp
  libc/src/math/gpu/fmaxf.cpp
  libc/src/math/gpu/fmaxl.cpp
  libc/src/math/gpu/fmin.cpp
  libc/src/math/gpu/fminf.cpp
  libc/src/math/gpu/fminl.cpp
  libc/src/math/gpu/fmod.cpp
  libc/src/math/gpu/fmodf.cpp
  libc/src/math/gpu/frexp.cpp
  libc/src/math/gpu/frexpf.cpp
  libc/src/math/gpu/ldexp.cpp
  libc/src/math/gpu/ldexpf.cpp
  libc/src/math/gpu/vendor/CMakeLists.txt
  libc/src/math/gpu/vendor/acosf.cpp
  libc/src/math/gpu/vendor/acoshf.cpp
  libc/src/math/gpu/vendor/amdgpu/amdgpu.h
  libc/src/math/gpu/vendor/amdgpu/declarations.h
  libc/src/math/gpu/vendor/asinf.cpp
  libc/src/math/gpu/vendor/asinhf.cpp
  libc/src/math/gpu/vendor/atanf.cpp
  libc/src/math/gpu/vendor/atanhf.cpp
  libc/src/math/gpu/vendor/coshf.cpp
  libc/src/math/gpu/vendor/exp10f.cpp
  libc/src/math/gpu/vendor/expm1f.cpp
  libc/src/math/gpu/vendor/fdim.cpp
  libc/src/math/gpu/vendor/fdimf.cpp
  libc/src/math/gpu/vendor/hypot.cpp
  libc/src/math/gpu/vendor/hypotf.cpp
  libc/src/math/gpu/vendor/ilogb.cpp
  libc/src/math/gpu/vendor/ilogbf.cpp
  libc/src/math/gpu/vendor/llrint.cpp
  libc/src/math/gpu/vendor/llrintf.cpp
  libc/src/math/gpu/vendor/llround.cpp
  libc/src/math/gpu/vendor/llroundf.cpp
  libc/src/math/gpu/vendor/nvptx/declarations.h
  libc/src/math/gpu/vendor/nvptx/nvptx.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152603.533188.patch
Type: text/x-patch
Size: 64636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230621/33326a44/attachment-0001.bin>


More information about the libc-commits mailing list