[libc-commits] [libc] 525726a - [libc] Cleanup unimplemented math functions (#143173)

via libc-commits libc-commits at lists.llvm.org
Fri Jun 6 10:27:22 PDT 2025


Author: Joseph Huber
Date: 2025-06-06T12:27:13-05:00
New Revision: 525726a52078d1a03e8903458f4e92d41154e879

URL: https://github.com/llvm/llvm-project/commit/525726a52078d1a03e8903458f4e92d41154e879
DIFF: https://github.com/llvm/llvm-project/commit/525726a52078d1a03e8903458f4e92d41154e879.diff

LOG: [libc] Cleanup unimplemented math functions (#143173)

Summary:
This patch cleans up the leftoever files that were either implemented or
are still unimplemented stubs.

Added: 
    

Modified: 
    libc/cmake/modules/LLVMLibCLibraryRules.cmake
    libc/cmake/modules/LLVMLibCObjectRules.cmake
    libc/cmake/modules/LLVMLibCTestRules.cmake
    libc/config/gpu/amdgpu/entrypoints.txt
    libc/config/gpu/nvptx/entrypoints.txt
    libc/src/math/amdgpu/CMakeLists.txt
    libc/src/math/amdgpu/frexp.cpp
    libc/src/math/amdgpu/frexpf.cpp
    libc/src/math/amdgpu/ldexp.cpp
    libc/src/math/amdgpu/ldexpf.cpp
    libc/src/math/amdgpu/lgamma.cpp
    libc/src/math/amdgpu/lgamma_r.cpp
    libc/src/math/amdgpu/llrint.cpp
    libc/src/math/amdgpu/llrintf.cpp
    libc/src/math/amdgpu/lrint.cpp
    libc/src/math/amdgpu/lrintf.cpp
    libc/src/math/amdgpu/scalbn.cpp
    libc/src/math/amdgpu/scalbnf.cpp
    libc/src/math/amdgpu/tgamma.cpp
    libc/src/math/amdgpu/tgammaf.cpp
    libc/src/math/nvptx/CMakeLists.txt
    libc/src/math/nvptx/lgamma.cpp
    libc/src/math/nvptx/lgamma_r.cpp
    libc/src/math/nvptx/llrint.cpp
    libc/src/math/nvptx/llrintf.cpp
    libc/src/math/nvptx/lrint.cpp
    libc/src/math/nvptx/tgamma.cpp
    libc/src/math/nvptx/tgammaf.cpp

Removed: 
    libc/src/math/amdgpu/acos.cpp
    libc/src/math/amdgpu/acosf.cpp
    libc/src/math/amdgpu/acosh.cpp
    libc/src/math/amdgpu/acoshf.cpp
    libc/src/math/amdgpu/asin.cpp
    libc/src/math/amdgpu/asinf.cpp
    libc/src/math/amdgpu/asinh.cpp
    libc/src/math/amdgpu/asinhf.cpp
    libc/src/math/amdgpu/atan.cpp
    libc/src/math/amdgpu/atan2.cpp
    libc/src/math/amdgpu/atan2f.cpp
    libc/src/math/amdgpu/atanf.cpp
    libc/src/math/amdgpu/atanh.cpp
    libc/src/math/amdgpu/atanhf.cpp
    libc/src/math/amdgpu/cos.cpp
    libc/src/math/amdgpu/cosf.cpp
    libc/src/math/amdgpu/cosh.cpp
    libc/src/math/amdgpu/coshf.cpp
    libc/src/math/amdgpu/declarations.h
    libc/src/math/amdgpu/erf.cpp
    libc/src/math/amdgpu/erff.cpp
    libc/src/math/amdgpu/exp.cpp
    libc/src/math/amdgpu/exp10.cpp
    libc/src/math/amdgpu/exp10f.cpp
    libc/src/math/amdgpu/exp2.cpp
    libc/src/math/amdgpu/exp2f.cpp
    libc/src/math/amdgpu/expf.cpp
    libc/src/math/amdgpu/expm1.cpp
    libc/src/math/amdgpu/expm1f.cpp
    libc/src/math/amdgpu/fdim.cpp
    libc/src/math/amdgpu/fdimf.cpp
    libc/src/math/amdgpu/hypot.cpp
    libc/src/math/amdgpu/hypotf.cpp
    libc/src/math/amdgpu/ilogb.cpp
    libc/src/math/amdgpu/ilogbf.cpp
    libc/src/math/amdgpu/log.cpp
    libc/src/math/amdgpu/log10.cpp
    libc/src/math/amdgpu/log10f.cpp
    libc/src/math/amdgpu/log1p.cpp
    libc/src/math/amdgpu/log1pf.cpp
    libc/src/math/amdgpu/log2.cpp
    libc/src/math/amdgpu/log2f.cpp
    libc/src/math/amdgpu/logb.cpp
    libc/src/math/amdgpu/logbf.cpp
    libc/src/math/amdgpu/logf.cpp
    libc/src/math/amdgpu/nextafter.cpp
    libc/src/math/amdgpu/nextafterf.cpp
    libc/src/math/amdgpu/platform.h
    libc/src/math/amdgpu/powf.cpp
    libc/src/math/amdgpu/powi.cpp
    libc/src/math/amdgpu/powif.cpp
    libc/src/math/amdgpu/remquo.cpp
    libc/src/math/amdgpu/remquof.cpp
    libc/src/math/amdgpu/sin.cpp
    libc/src/math/amdgpu/sincos.cpp
    libc/src/math/amdgpu/sincosf.cpp
    libc/src/math/amdgpu/sinf.cpp
    libc/src/math/amdgpu/sinh.cpp
    libc/src/math/amdgpu/sinhf.cpp
    libc/src/math/amdgpu/tan.cpp
    libc/src/math/amdgpu/tanf.cpp
    libc/src/math/amdgpu/tanh.cpp
    libc/src/math/amdgpu/tanhf.cpp
    libc/src/math/nvptx/acos.cpp
    libc/src/math/nvptx/acosf.cpp
    libc/src/math/nvptx/acosh.cpp
    libc/src/math/nvptx/acoshf.cpp
    libc/src/math/nvptx/asin.cpp
    libc/src/math/nvptx/asinf.cpp
    libc/src/math/nvptx/asinh.cpp
    libc/src/math/nvptx/asinhf.cpp
    libc/src/math/nvptx/atan.cpp
    libc/src/math/nvptx/atan2.cpp
    libc/src/math/nvptx/atan2f.cpp
    libc/src/math/nvptx/atanf.cpp
    libc/src/math/nvptx/atanh.cpp
    libc/src/math/nvptx/atanhf.cpp
    libc/src/math/nvptx/cos.cpp
    libc/src/math/nvptx/cosf.cpp
    libc/src/math/nvptx/cosh.cpp
    libc/src/math/nvptx/coshf.cpp
    libc/src/math/nvptx/declarations.h
    libc/src/math/nvptx/erf.cpp
    libc/src/math/nvptx/erff.cpp
    libc/src/math/nvptx/exp.cpp
    libc/src/math/nvptx/exp10.cpp
    libc/src/math/nvptx/exp10f.cpp
    libc/src/math/nvptx/exp2.cpp
    libc/src/math/nvptx/exp2f.cpp
    libc/src/math/nvptx/expf.cpp
    libc/src/math/nvptx/expm1.cpp
    libc/src/math/nvptx/expm1f.cpp
    libc/src/math/nvptx/fdim.cpp
    libc/src/math/nvptx/fdimf.cpp
    libc/src/math/nvptx/frexp.cpp
    libc/src/math/nvptx/frexpf.cpp
    libc/src/math/nvptx/hypot.cpp
    libc/src/math/nvptx/hypotf.cpp
    libc/src/math/nvptx/ilogb.cpp
    libc/src/math/nvptx/ilogbf.cpp
    libc/src/math/nvptx/ldexp.cpp
    libc/src/math/nvptx/ldexpf.cpp
    libc/src/math/nvptx/log.cpp
    libc/src/math/nvptx/log10.cpp
    libc/src/math/nvptx/log10f.cpp
    libc/src/math/nvptx/log1p.cpp
    libc/src/math/nvptx/log1pf.cpp
    libc/src/math/nvptx/log2.cpp
    libc/src/math/nvptx/log2f.cpp
    libc/src/math/nvptx/logb.cpp
    libc/src/math/nvptx/logbf.cpp
    libc/src/math/nvptx/logf.cpp
    libc/src/math/nvptx/lrintf.cpp
    libc/src/math/nvptx/nextafter.cpp
    libc/src/math/nvptx/nextafterf.cpp
    libc/src/math/nvptx/nvptx.h
    libc/src/math/nvptx/powf.cpp
    libc/src/math/nvptx/powi.cpp
    libc/src/math/nvptx/powif.cpp
    libc/src/math/nvptx/remquo.cpp
    libc/src/math/nvptx/remquof.cpp
    libc/src/math/nvptx/scalbn.cpp
    libc/src/math/nvptx/scalbnf.cpp
    libc/src/math/nvptx/sin.cpp
    libc/src/math/nvptx/sincos.cpp
    libc/src/math/nvptx/sincosf.cpp
    libc/src/math/nvptx/sinf.cpp
    libc/src/math/nvptx/sinh.cpp
    libc/src/math/nvptx/sinhf.cpp
    libc/src/math/nvptx/tan.cpp
    libc/src/math/nvptx/tanf.cpp
    libc/src/math/nvptx/tanh.cpp
    libc/src/math/nvptx/tanhf.cpp


################################################################################
diff  --git a/libc/cmake/modules/LLVMLibCLibraryRules.cmake b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
index 80351792fb18a..b464c189420b7 100644
--- a/libc/cmake/modules/LLVMLibCLibraryRules.cmake
+++ b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
@@ -19,8 +19,7 @@ function(collect_object_file_deps target result)
     return()
   endif()
 
-  if(${target_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE} OR
-     ${target_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})
+  if(${target_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE})
     set(entrypoint_target ${target})
     get_target_property(is_alias ${entrypoint_target} "IS_ALIAS")
     if(is_alias)
@@ -55,8 +54,7 @@ function(get_all_object_file_deps result fq_deps_list)
   foreach(dep ${fq_deps_list})
     get_target_property(dep_type ${dep} "TARGET_TYPE")
     if(NOT ((${dep_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE}) OR
-            (${dep_type} STREQUAL ${ENTRYPOINT_EXT_TARGET_TYPE}) OR
-            (${dep_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})))
+            (${dep_type} STREQUAL ${ENTRYPOINT_EXT_TARGET_TYPE})))
       message(FATAL_ERROR "Dependency '${dep}' of 'add_entrypoint_collection' is "
                           "not an 'add_entrypoint_object' or 'add_entrypoint_external' target.")
     endif()
@@ -64,8 +62,7 @@ function(get_all_object_file_deps result fq_deps_list)
     list(APPEND all_deps ${recursive_deps})
     # Add the entrypoint object target explicitly as collect_object_file_deps
     # only collects object files from non-entrypoint targets.
-    if(${dep_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE} OR
-       ${dep_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})
+    if(${dep_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE})
       set(entrypoint_target ${dep})
       get_target_property(is_alias ${entrypoint_target} "IS_ALIAS")
       if(is_alias)

diff  --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index 142778d9ea1cc..805da91284ce8 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -111,7 +111,6 @@ function(add_object_library target_name)
 endfunction(add_object_library)
 
 set(ENTRYPOINT_OBJ_TARGET_TYPE "ENTRYPOINT_OBJ")
-set(ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE "ENTRYPOINT_OBJ_VENDOR")
 
 # A rule for entrypoint object targets.
 # Usage:
@@ -129,20 +128,13 @@ set(ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE "ENTRYPOINT_OBJ_VENDOR")
 function(create_entrypoint_object fq_target_name)
   cmake_parse_arguments(
     "ADD_ENTRYPOINT_OBJ"
-    "ALIAS;REDIRECTED;VENDOR" # Optional argument
+    "ALIAS;REDIRECTED" # Optional argument
     "NAME;CXX_STANDARD" # Single value arguments
     "SRCS;HDRS;DEPENDS;COMPILE_OPTIONS;FLAGS"  # Multi value arguments
     ${ARGN}
   )
 
   set(entrypoint_target_type ${ENTRYPOINT_OBJ_TARGET_TYPE})
-  if(${ADD_ENTRYPOINT_OBJ_VENDOR})
-    # TODO: We currently rely on external definitions of certain math functions
-    # provided by GPU vendors like AMD or Nvidia. We need to mark these so we
-    # don't end up running tests on these. In the future all of these should be
-    # implemented and this can be removed.
-    set(entrypoint_target_type ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})
-  endif()
   list(FIND TARGET_ENTRYPOINT_NAME_LIST ${ADD_ENTRYPOINT_OBJ_NAME} entrypoint_name_index)
   if(${entrypoint_name_index} EQUAL -1)
     add_custom_target(${fq_target_name})
@@ -186,8 +178,8 @@ function(create_entrypoint_object fq_target_name)
     endif()
 
     get_target_property(obj_type ${fq_dep_name} "TARGET_TYPE")
-    if((NOT obj_type) OR (NOT (${obj_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE} OR
-                               ${obj_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})))
+    if((NOT obj_type) OR (NOT ${obj_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE}))
+                              
       message(FATAL_ERROR "The aliasee of an entrypoint alias should be an entrypoint.")
     endif()
 

diff  --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index 54f337ecf0999..1cd09816e223f 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -168,10 +168,6 @@ function(get_object_files_for_test result skipped_entrypoints_list)
           endif()
           list(APPEND dep_obj ${object_file_raw})
         endif()
-      elseif(${dep_type} STREQUAL ${ENTRYPOINT_OBJ_VENDOR_TARGET_TYPE})
-        # Skip tests for externally implemented entrypoints.
-        list(APPEND dep_skip ${dep})
-        list(REMOVE_ITEM dep_obj ${dep})
       endif()
 
       set_target_properties(${dep} PROPERTIES

diff  --git a/libc/config/gpu/amdgpu/entrypoints.txt b/libc/config/gpu/amdgpu/entrypoints.txt
index 15c4b51cb2410..f41ebdc59f6b2 100644
--- a/libc/config/gpu/amdgpu/entrypoints.txt
+++ b/libc/config/gpu/amdgpu/entrypoints.txt
@@ -282,18 +282,14 @@ set(TARGET_LIBM_ENTRYPOINTS
     # math.h entrypoints
     libc.src.math.acos
     libc.src.math.acosf
-    libc.src.math.acosh
-    libc.src.math.acoshf
     libc.src.math.asin
     libc.src.math.asinf
-    libc.src.math.asinh
     libc.src.math.asinhf
     libc.src.math.atan
     libc.src.math.atan2
     libc.src.math.atan2f
     libc.src.math.atan2l
     libc.src.math.atanf
-    libc.src.math.atanh
     libc.src.math.atanhf
     libc.src.math.canonicalize
     libc.src.math.canonicalizef
@@ -308,14 +304,12 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.copysignl
     libc.src.math.cos
     libc.src.math.cosf
-    libc.src.math.cosh
     libc.src.math.coshf
     libc.src.math.cospif
     libc.src.math.ddivl
     libc.src.math.dfmal
     libc.src.math.dmull
     libc.src.math.dsqrtl
-    libc.src.math.erf
     libc.src.math.erff
     libc.src.math.exp
     libc.src.math.exp10
@@ -456,8 +450,6 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.nextupl
     libc.src.math.pow
     libc.src.math.powf
-    libc.src.math.powi
-    libc.src.math.powif
     libc.src.math.remainder
     libc.src.math.remainderf
     libc.src.math.remainderl
@@ -489,7 +481,6 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.sincos
     libc.src.math.sincosf
     libc.src.math.sinf
-    libc.src.math.sinh
     libc.src.math.sinhf
     libc.src.math.sinpif
     libc.src.math.sqrt
@@ -497,7 +488,6 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.sqrtl
     libc.src.math.tan
     libc.src.math.tanf
-    libc.src.math.tanh
     libc.src.math.tanhf
     libc.src.math.tgamma
     libc.src.math.tgammaf

diff  --git a/libc/config/gpu/nvptx/entrypoints.txt b/libc/config/gpu/nvptx/entrypoints.txt
index 36c5ce193a57c..2b8c29fda3dc8 100644
--- a/libc/config/gpu/nvptx/entrypoints.txt
+++ b/libc/config/gpu/nvptx/entrypoints.txt
@@ -280,20 +280,16 @@ set(TARGET_LIBC_ENTRYPOINTS
 
 set(TARGET_LIBM_ENTRYPOINTS
     # math.h entrypoints
-    libc.src.math.acos
     libc.src.math.acosf
-    libc.src.math.acosh
     libc.src.math.acoshf
     libc.src.math.asin
     libc.src.math.asinf
-    libc.src.math.asinh
     libc.src.math.asinhf
     libc.src.math.atan
     libc.src.math.atan2
     libc.src.math.atan2f
     libc.src.math.atan2l
     libc.src.math.atanf
-    libc.src.math.atanh
     libc.src.math.atanhf
     libc.src.math.canonicalize
     libc.src.math.canonicalizef
@@ -308,14 +304,12 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.copysignl
     libc.src.math.cos
     libc.src.math.cosf
-    libc.src.math.cosh
     libc.src.math.coshf
     libc.src.math.cospif
     libc.src.math.ddivl
     libc.src.math.dfmal
     libc.src.math.dmull
     libc.src.math.dsqrtl
-    libc.src.math.erf
     libc.src.math.erff
     libc.src.math.exp
     libc.src.math.exp10
@@ -457,8 +451,6 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.nextupl
     libc.src.math.pow
     libc.src.math.powf
-    libc.src.math.powi
-    libc.src.math.powif
     libc.src.math.remainder
     libc.src.math.remainderf
     libc.src.math.remainderl
@@ -490,7 +482,6 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.sincos
     libc.src.math.sincosf
     libc.src.math.sinf
-    libc.src.math.sinh
     libc.src.math.sinhf
     libc.src.math.sinpif
     libc.src.math.sqrt
@@ -498,7 +489,6 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.sqrtl
     libc.src.math.tan
     libc.src.math.tanf
-    libc.src.math.tanh
     libc.src.math.tanhf
     libc.src.math.tgamma
     libc.src.math.tgammaf

diff  --git a/libc/src/math/amdgpu/CMakeLists.txt b/libc/src/math/amdgpu/CMakeLists.txt
index 23fd3169fddfe..4d81b7654f826 100644
--- a/libc/src/math/amdgpu/CMakeLists.txt
+++ b/libc/src/math/amdgpu/CMakeLists.txt
@@ -346,152 +346,6 @@ add_entrypoint_object(
     -O2
 )
 
-# The following functions currently are not implemented natively and borrow from
-# existing implementations. This will be removed in the future.
-add_entrypoint_object(
-  acos
-  SRCS
-    acos.cpp
-  HDRS
-    ../acos.h
-  VENDOR
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-)
-
-add_entrypoint_object(
-  acosh
-  SRCS
-    acosh.cpp
-  HDRS
-    ../acosh.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  asin
-  SRCS
-    asin.cpp
-  HDRS
-    ../asin.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  asinh
-  SRCS
-    asinh.cpp
-  HDRS
-    ../asinh.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  atan
-  SRCS
-    atan.cpp
-  HDRS
-    ../atan.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  atanh
-  SRCS
-    atanh.cpp
-  HDRS
-    ../atanh.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  cosh
-  SRCS
-    cosh.cpp
-  HDRS
-    ../cosh.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  erf
-  SRCS
-    erf.cpp
-  HDRS
-    ../erf.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  powi
-  SRCS
-    powi.cpp
-  HDRS
-    ../powi.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  powif
-  SRCS
-    powif.cpp
-  HDRS
-    ../powif.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  sinh
-  SRCS
-    sinh.cpp
-  HDRS
-    ../sinh.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  tanh
-  SRCS
-    tanh.cpp
-  HDRS
-    ../tanh.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
 add_entrypoint_object(
   tgamma
   SRCS
@@ -501,7 +355,6 @@ add_entrypoint_object(
   COMPILE_OPTIONS
     ${bitcode_link_flags}
     -O2
-  VENDOR
 )
 
 add_entrypoint_object(
@@ -513,7 +366,6 @@ add_entrypoint_object(
   COMPILE_OPTIONS
     ${bitcode_link_flags}
     -O2
-  VENDOR
 )
 
 add_entrypoint_object(
@@ -525,7 +377,6 @@ add_entrypoint_object(
   COMPILE_OPTIONS
     ${bitcode_link_flags}
     -O2
-  VENDOR
 )
 
 add_entrypoint_object(
@@ -537,5 +388,4 @@ add_entrypoint_object(
   COMPILE_OPTIONS
     ${bitcode_link_flags}
     -O2
-  VENDOR
 )

diff  --git a/libc/src/math/amdgpu/acos.cpp b/libc/src/math/amdgpu/acos.cpp
deleted file mode 100644
index de870f207326e..0000000000000
--- a/libc/src/math/amdgpu/acos.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU acos function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/acos.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, acos, (double x)) { return __ocml_acos_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/acosf.cpp b/libc/src/math/amdgpu/acosf.cpp
deleted file mode 100644
index 0a72a70a3ee9d..0000000000000
--- a/libc/src/math/amdgpu/acosf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the acosf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/acosf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, acosf, (float x)) { return __ocml_acos_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/acosh.cpp b/libc/src/math/amdgpu/acosh.cpp
deleted file mode 100644
index 15c9734499832..0000000000000
--- a/libc/src/math/amdgpu/acosh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU acosh function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/acosh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, acosh, (double x)) { return __ocml_acosh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/acoshf.cpp b/libc/src/math/amdgpu/acoshf.cpp
deleted file mode 100644
index 79e71b02e7198..0000000000000
--- a/libc/src/math/amdgpu/acoshf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the acoshf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/acoshf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, acoshf, (float x)) { return __ocml_acosh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/asin.cpp b/libc/src/math/amdgpu/asin.cpp
deleted file mode 100644
index a79641e1977cb..0000000000000
--- a/libc/src/math/amdgpu/asin.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU asin function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/asin.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, asin, (double x)) { return __ocml_asin_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/asinf.cpp b/libc/src/math/amdgpu/asinf.cpp
deleted file mode 100644
index e70944a4d9890..0000000000000
--- a/libc/src/math/amdgpu/asinf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the asinf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/asinf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, asinf, (float x)) { return __ocml_asin_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/asinh.cpp b/libc/src/math/amdgpu/asinh.cpp
deleted file mode 100644
index 642368592a99b..0000000000000
--- a/libc/src/math/amdgpu/asinh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU asinh function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/asinh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, asinh, (double x)) { return __ocml_asinh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/asinhf.cpp b/libc/src/math/amdgpu/asinhf.cpp
deleted file mode 100644
index bafa77f946000..0000000000000
--- a/libc/src/math/amdgpu/asinhf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the asinhf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/asinhf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, asinhf, (float x)) { return __ocml_asinh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/atan.cpp b/libc/src/math/amdgpu/atan.cpp
deleted file mode 100644
index 49941e97096f7..0000000000000
--- a/libc/src/math/amdgpu/atan.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU atan function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atan.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, atan, (double x)) { return __ocml_atan_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/atan2.cpp b/libc/src/math/amdgpu/atan2.cpp
deleted file mode 100644
index f5907504cb364..0000000000000
--- a/libc/src/math/amdgpu/atan2.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the GPU atan2 function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atan2.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, atan2, (double x, double y)) {
-  return __ocml_atan2_f64(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/atan2f.cpp b/libc/src/math/amdgpu/atan2f.cpp
deleted file mode 100644
index 736c77d1cbce9..0000000000000
--- a/libc/src/math/amdgpu/atan2f.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the GPU atan2f function -------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atan2f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, atan2f, (float x, float y)) {
-  return __ocml_atan2_f32(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/atanf.cpp b/libc/src/math/amdgpu/atanf.cpp
deleted file mode 100644
index ab1837dd026b7..0000000000000
--- a/libc/src/math/amdgpu/atanf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the atanf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atanf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, atanf, (float x)) { return __ocml_atan_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/atanh.cpp b/libc/src/math/amdgpu/atanh.cpp
deleted file mode 100644
index 091c155190f94..0000000000000
--- a/libc/src/math/amdgpu/atanh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU atanh function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atanh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, atanh, (double x)) { return __ocml_atanh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/atanhf.cpp b/libc/src/math/amdgpu/atanhf.cpp
deleted file mode 100644
index fa9cf39383963..0000000000000
--- a/libc/src/math/amdgpu/atanhf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the atanhf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atanhf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, atanhf, (float x)) { return __ocml_atanh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/cos.cpp b/libc/src/math/amdgpu/cos.cpp
deleted file mode 100644
index a4d4c94dd7ac7..0000000000000
--- a/libc/src/math/amdgpu/cos.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the cos function for GPU ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/cos.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, cos, (double x)) { return __ocml_cos_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/cosf.cpp b/libc/src/math/amdgpu/cosf.cpp
deleted file mode 100644
index 99ec1185a8346..0000000000000
--- a/libc/src/math/amdgpu/cosf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the cosf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/cosf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, cosf, (float x)) { return __ocml_cos_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/cosh.cpp b/libc/src/math/amdgpu/cosh.cpp
deleted file mode 100644
index d94d7af251261..0000000000000
--- a/libc/src/math/amdgpu/cosh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the cosh function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/cosh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, cosh, (double x)) { return __ocml_cosh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/coshf.cpp b/libc/src/math/amdgpu/coshf.cpp
deleted file mode 100644
index 5b641be27818a..0000000000000
--- a/libc/src/math/amdgpu/coshf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the coshf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/coshf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, coshf, (float x)) { return __ocml_cosh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/declarations.h b/libc/src/math/amdgpu/declarations.h
deleted file mode 100644
index 88e2201521b67..0000000000000
--- a/libc/src/math/amdgpu/declarations.h
+++ /dev/null
@@ -1,91 +0,0 @@
-//===-- AMDGPU specific declarations for math support ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_MATH_AMDGPU_DECLARATIONS_H
-#define LLVM_LIBC_SRC_MATH_AMDGPU_DECLARATIONS_H
-
-#include "platform.h"
-
-#include "src/__support/GPU/utils.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-extern "C" {
-float __ocml_acos_f32(float);
-double __ocml_acos_f64(double);
-float __ocml_acosh_f32(float);
-double __ocml_acosh_f64(double);
-float __ocml_asin_f32(float);
-double __ocml_asin_f64(double);
-float __ocml_asinh_f32(float);
-double __ocml_asinh_f64(double);
-float __ocml_atan_f32(float);
-double __ocml_atan_f64(double);
-float __ocml_atan2_f32(float, float);
-double __ocml_atan2_f64(double, double);
-float __ocml_atanh_f32(float);
-double __ocml_atanh_f64(double);
-float __ocml_cos_f32(float);
-double __ocml_cos_f64(double);
-float __ocml_cosh_f32(float);
-double __ocml_cosh_f64(double);
-float __ocml_erf_f32(float);
-double __ocml_erf_f64(double);
-float __ocml_exp_f32(float);
-double __ocml_exp_f64(double);
-float __ocml_exp2_f32(float);
-double __ocml_exp2_f64(double);
-float __ocml_exp10_f32(float);
-double __ocml_exp10_f64(double);
-double __ocml_exp2_f64(double);
-float __ocml_expm1_f32(float);
-double __ocml_expm1_f64(double);
-float __ocml_fdim_f32(float, float);
-double __ocml_fdim_f64(double, double);
-float __ocml_hypot_f32(float, float);
-double __ocml_hypot_f64(double, double);
-int __ocml_ilogb_f64(double);
-int __ocml_ilogb_f32(float);
-float __ocml_ldexp_f32(float, int);
-double __ocml_ldexp_f64(double, int);
-float __ocml_log10_f32(float);
-double __ocml_log10_f64(double);
-float __ocml_log1p_f32(float);
-double __ocml_log1p_f64(double);
-float __ocml_log2_f32(float);
-double __ocml_log2_f64(double);
-float __ocml_log_f32(float);
-double __ocml_log_f64(double);
-float __ocml_nextafter_f32(float, float);
-double __ocml_nextafter_f64(double, double);
-float __ocml_pow_f32(float, float);
-double __ocml_pow_f64(double, double);
-float __ocml_pown_f32(float, int);
-double __ocml_pown_f64(double, int);
-float __ocml_sin_f32(float);
-double __ocml_sin_f64(double);
-float __ocml_sincos_f32(float, float *);
-double __ocml_sincos_f64(double, double *);
-float __ocml_sinh_f32(float);
-double __ocml_sinh_f64(double);
-float __ocml_tan_f32(float);
-double __ocml_tan_f64(double);
-float __ocml_tanh_f32(float);
-double __ocml_tanh_f64(double);
-float __ocml_remquo_f32(float, float, gpu::Private<int> *);
-double __ocml_remquo_f64(double, double, gpu::Private<int> *);
-double __ocml_tgamma_f64(double);
-float __ocml_tgamma_f32(float);
-double __ocml_lgamma_f64(double);
-double __ocml_lgamma_r_f64(double, gpu::Private<int> *);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LLVM_LIBC_SRC_MATH_AMDGPU_DECLARATIONS_H

diff  --git a/libc/src/math/amdgpu/erf.cpp b/libc/src/math/amdgpu/erf.cpp
deleted file mode 100644
index 07ae268ff2cdc..0000000000000
--- a/libc/src/math/amdgpu/erf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU erf function ----------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/erf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, erf, (double x)) { return __ocml_erf_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/erff.cpp b/libc/src/math/amdgpu/erff.cpp
deleted file mode 100644
index a4b7b275cfcc2..0000000000000
--- a/libc/src/math/amdgpu/erff.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU erff function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/erff.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, erff, (float x)) { return __ocml_erf_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/exp.cpp b/libc/src/math/amdgpu/exp.cpp
deleted file mode 100644
index dae79bec5599b..0000000000000
--- a/libc/src/math/amdgpu/exp.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU exp function ----------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, exp, (double x)) { return __ocml_exp_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/exp10.cpp b/libc/src/math/amdgpu/exp10.cpp
deleted file mode 100644
index f13d218ca88c4..0000000000000
--- a/libc/src/math/amdgpu/exp10.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU exp10 function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp10.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, exp10, (double x)) { return __ocml_exp10_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/exp10f.cpp b/libc/src/math/amdgpu/exp10f.cpp
deleted file mode 100644
index 883e734e06877..0000000000000
--- a/libc/src/math/amdgpu/exp10f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the exp10f function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp10f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, exp10f, (float x)) { return __ocml_exp10_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/exp2.cpp b/libc/src/math/amdgpu/exp2.cpp
deleted file mode 100644
index fb336cf48f157..0000000000000
--- a/libc/src/math/amdgpu/exp2.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU exp2 function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp2.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, exp2, (double x)) { return __ocml_exp2_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/exp2f.cpp b/libc/src/math/amdgpu/exp2f.cpp
deleted file mode 100644
index 77b4a9c3b86e7..0000000000000
--- a/libc/src/math/amdgpu/exp2f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the exp2f function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp2f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, exp2f, (float x)) { return __ocml_exp2_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/expf.cpp b/libc/src/math/amdgpu/expf.cpp
deleted file mode 100644
index 6c44aad164bfd..0000000000000
--- a/libc/src/math/amdgpu/expf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the expf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/expf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, expf, (float x)) { return __ocml_exp_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/expm1.cpp b/libc/src/math/amdgpu/expm1.cpp
deleted file mode 100644
index df3643f9c78b5..0000000000000
--- a/libc/src/math/amdgpu/expm1.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU expm1 function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/expm1.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, expm1, (double x)) { return __ocml_expm1_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/expm1f.cpp b/libc/src/math/amdgpu/expm1f.cpp
deleted file mode 100644
index 2409997f479c3..0000000000000
--- a/libc/src/math/amdgpu/expm1f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the expm1f function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/expm1f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, expm1f, (float x)) { return __ocml_expm1_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/fdim.cpp b/libc/src/math/amdgpu/fdim.cpp
deleted file mode 100644
index 8ade0b21503b1..0000000000000
--- a/libc/src/math/amdgpu/fdim.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the fdim function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/fdim.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, fdim, (double x, double y)) {
-  return __ocml_fdim_f64(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/fdimf.cpp b/libc/src/math/amdgpu/fdimf.cpp
deleted file mode 100644
index ed3855e5ce2d6..0000000000000
--- a/libc/src/math/amdgpu/fdimf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the fdimf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/fdimf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, fdimf, (float x, float y)) {
-  return __ocml_fdim_f32(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/frexp.cpp b/libc/src/math/amdgpu/frexp.cpp
index 00e5187c0c719..4ae2b00198ec3 100644
--- a/libc/src/math/amdgpu/frexp.cpp
+++ b/libc/src/math/amdgpu/frexp.cpp
@@ -9,7 +9,6 @@
 #include "src/math/frexp.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {

diff  --git a/libc/src/math/amdgpu/frexpf.cpp b/libc/src/math/amdgpu/frexpf.cpp
index 2799e542efae2..fd53f65701f59 100644
--- a/libc/src/math/amdgpu/frexpf.cpp
+++ b/libc/src/math/amdgpu/frexpf.cpp
@@ -9,7 +9,6 @@
 #include "src/math/frexpf.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {

diff  --git a/libc/src/math/amdgpu/hypot.cpp b/libc/src/math/amdgpu/hypot.cpp
deleted file mode 100644
index dcf1152a75160..0000000000000
--- a/libc/src/math/amdgpu/hypot.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the hypot function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/hypot.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, hypot, (double x, double y)) {
-  return __ocml_hypot_f64(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/hypotf.cpp b/libc/src/math/amdgpu/hypotf.cpp
deleted file mode 100644
index 68ec659d12e5b..0000000000000
--- a/libc/src/math/amdgpu/hypotf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the hypotf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/hypotf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, hypotf, (float x, float y)) {
-  return __ocml_hypot_f32(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/ilogb.cpp b/libc/src/math/amdgpu/ilogb.cpp
deleted file mode 100644
index 37f24dfd8c39c..0000000000000
--- a/libc/src/math/amdgpu/ilogb.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the ilogb function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/ilogb.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(int, ilogb, (double x)) { return __ocml_ilogb_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/ilogbf.cpp b/libc/src/math/amdgpu/ilogbf.cpp
deleted file mode 100644
index 56e74e1575f1d..0000000000000
--- a/libc/src/math/amdgpu/ilogbf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the ilogbf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/ilogbf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(int, ilogbf, (float x)) { return __ocml_ilogb_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/ldexp.cpp b/libc/src/math/amdgpu/ldexp.cpp
index 393eabb84e61b..5b786a9b21e70 100644
--- a/libc/src/math/amdgpu/ldexp.cpp
+++ b/libc/src/math/amdgpu/ldexp.cpp
@@ -9,7 +9,6 @@
 #include "src/math/ldexp.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {

diff  --git a/libc/src/math/amdgpu/ldexpf.cpp b/libc/src/math/amdgpu/ldexpf.cpp
index 970603dd170eb..d3aa77fe592cb 100644
--- a/libc/src/math/amdgpu/ldexpf.cpp
+++ b/libc/src/math/amdgpu/ldexpf.cpp
@@ -9,7 +9,6 @@
 #include "src/math/ldexpf.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {

diff  --git a/libc/src/math/amdgpu/lgamma.cpp b/libc/src/math/amdgpu/lgamma.cpp
index acff4c76734e1..9666927e60c47 100644
--- a/libc/src/math/amdgpu/lgamma.cpp
+++ b/libc/src/math/amdgpu/lgamma.cpp
@@ -9,11 +9,11 @@
 #include "src/math/lgamma.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
-LLVM_LIBC_FUNCTION(double, lgamma, (double x)) { return __ocml_lgamma_f64(x); }
+// TODO: Implement this.
+LLVM_LIBC_FUNCTION(double, lgamma, (double)) { return 0.0; }
 
 } // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/lgamma_r.cpp b/libc/src/math/amdgpu/lgamma_r.cpp
index 0a79988d66e30..8b69ca349456c 100644
--- a/libc/src/math/amdgpu/lgamma_r.cpp
+++ b/libc/src/math/amdgpu/lgamma_r.cpp
@@ -9,16 +9,13 @@
 #include "src/math/lgamma_r.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
-LLVM_LIBC_FUNCTION(double, lgamma_r, (double x, int *signp)) {
-  int tmp = *signp;
-  double r = __ocml_lgamma_r_f64(x, (gpu::Private<int> *)&tmp);
-  *signp = tmp;
-  return r;
+LLVM_LIBC_FUNCTION(double, lgamma_r, (double, int *signp)) {
+  *signp = 0;
+  return 0;
 }
 
 } // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/llrint.cpp b/libc/src/math/amdgpu/llrint.cpp
index 21129fe80a0c1..6e0f57a5a0387 100644
--- a/libc/src/math/amdgpu/llrint.cpp
+++ b/libc/src/math/amdgpu/llrint.cpp
@@ -9,7 +9,6 @@
 #include "src/math/llrint.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {

diff  --git a/libc/src/math/amdgpu/llrintf.cpp b/libc/src/math/amdgpu/llrintf.cpp
index a6f9f43876010..d8de23fac3c8b 100644
--- a/libc/src/math/amdgpu/llrintf.cpp
+++ b/libc/src/math/amdgpu/llrintf.cpp
@@ -9,7 +9,6 @@
 #include "src/math/llrintf.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {

diff  --git a/libc/src/math/amdgpu/log.cpp b/libc/src/math/amdgpu/log.cpp
deleted file mode 100644
index bd01adfa08a4d..0000000000000
--- a/libc/src/math/amdgpu/log.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log function ----------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, log, (double x)) { return __ocml_log_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/log10.cpp b/libc/src/math/amdgpu/log10.cpp
deleted file mode 100644
index 75957c9aeb506..0000000000000
--- a/libc/src/math/amdgpu/log10.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log10 function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log10.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, log10, (double x)) { return __ocml_log10_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/log10f.cpp b/libc/src/math/amdgpu/log10f.cpp
deleted file mode 100644
index 9c12d6b11bcf0..0000000000000
--- a/libc/src/math/amdgpu/log10f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log10f function -------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log10f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, log10f, (float x)) { return __ocml_log10_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/log1p.cpp b/libc/src/math/amdgpu/log1p.cpp
deleted file mode 100644
index fc275196830f6..0000000000000
--- a/libc/src/math/amdgpu/log1p.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log1p function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log1p.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, log1p, (double x)) { return __ocml_log1p_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/log1pf.cpp b/libc/src/math/amdgpu/log1pf.cpp
deleted file mode 100644
index b2d26fb1166fc..0000000000000
--- a/libc/src/math/amdgpu/log1pf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log1pf function -------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log1pf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, log1pf, (float x)) { return __ocml_log1p_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/log2.cpp b/libc/src/math/amdgpu/log2.cpp
deleted file mode 100644
index 73f34b65a32f7..0000000000000
--- a/libc/src/math/amdgpu/log2.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log2 function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log2.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, log2, (double x)) { return __ocml_log2_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/log2f.cpp b/libc/src/math/amdgpu/log2f.cpp
deleted file mode 100644
index 3b62edacfa656..0000000000000
--- a/libc/src/math/amdgpu/log2f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log2f function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log2f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, log2f, (float x)) { return __ocml_log2_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/logb.cpp b/libc/src/math/amdgpu/logb.cpp
deleted file mode 100644
index 4b68e281be874..0000000000000
--- a/libc/src/math/amdgpu/logb.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU logb function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/logb.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, logb, (double x)) { return __ocml_logb_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/logbf.cpp b/libc/src/math/amdgpu/logbf.cpp
deleted file mode 100644
index bc7c462c7f927..0000000000000
--- a/libc/src/math/amdgpu/logbf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU logbf function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/logbf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, logbf, (float x)) { return __ocml_logb_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/logf.cpp b/libc/src/math/amdgpu/logf.cpp
deleted file mode 100644
index 17925672ef32f..0000000000000
--- a/libc/src/math/amdgpu/logf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU logf function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/logf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, logf, (float x)) { return __ocml_log_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/lrint.cpp b/libc/src/math/amdgpu/lrint.cpp
index 715b552575789..5ba70ec890b2c 100644
--- a/libc/src/math/amdgpu/lrint.cpp
+++ b/libc/src/math/amdgpu/lrint.cpp
@@ -9,7 +9,6 @@
 #include "src/math/lrint.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {

diff  --git a/libc/src/math/amdgpu/lrintf.cpp b/libc/src/math/amdgpu/lrintf.cpp
index 387063803f27f..1c985b01c2dc1 100644
--- a/libc/src/math/amdgpu/lrintf.cpp
+++ b/libc/src/math/amdgpu/lrintf.cpp
@@ -9,7 +9,6 @@
 #include "src/math/lrintf.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {

diff  --git a/libc/src/math/amdgpu/nextafter.cpp b/libc/src/math/amdgpu/nextafter.cpp
deleted file mode 100644
index 226b8a5a12547..0000000000000
--- a/libc/src/math/amdgpu/nextafter.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the nextafter function for GPU ------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/nextafter.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, nextafter, (double x, double y)) {
-  return __ocml_nextafter_f64(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/nextafterf.cpp b/libc/src/math/amdgpu/nextafterf.cpp
deleted file mode 100644
index 7bed2c17b6e12..0000000000000
--- a/libc/src/math/amdgpu/nextafterf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the nextafterf function for GPU -----------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/nextafterf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, nextafterf, (float x, float y)) {
-  return __ocml_nextafter_f32(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/platform.h b/libc/src/math/amdgpu/platform.h
deleted file mode 100644
index 472a9830e8bb3..0000000000000
--- a/libc/src/math/amdgpu/platform.h
+++ /dev/null
@@ -1,55 +0,0 @@
-//===-- AMDGPU specific platform definitions for math support -------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_MATH_AMDGPU_PLATFORM_H
-#define LLVM_LIBC_SRC_MATH_AMDGPU_PLATFORM_H
-
-#include "src/__support/macros/attributes.h"
-#include "src/__support/macros/config.h"
-
-#include <stdint.h>
-
-namespace LIBC_NAMESPACE_DECL {
-
-// The ROCm device library uses control globals to alter codegen for the
-// 
diff erent targets. To avoid needing to link them in manually we simply
-// define them here.
-extern "C" {
-
-// Disable unsafe math optimizations in the implementation.
-extern const LIBC_INLINE_VAR uint8_t __oclc_unsafe_math_opt = 0;
-
-// Disable denormalization at zero optimizations in the implementation.
-extern const LIBC_INLINE_VAR uint8_t __oclc_daz_opt = 0;
-
-// Disable rounding optimizations for 32-bit square roots.
-extern const LIBC_INLINE_VAR uint8_t __oclc_correctly_rounded_sqrt32 = 1;
-
-// Disable finite math optimizations.
-extern const LIBC_INLINE_VAR uint8_t __oclc_finite_only_opt = 0;
-
-// Set the ISA value to a high enough value that the ROCm device library math
-// functions will assume we have fast FMA operations among other features. This
-// is determined to be safe on all targets by looking at the source code.
-// https://github.com/ROCm/ROCm-Device-Libs/blob/amd-stg-open/ocml/src/opts.h
-extern const LIBC_INLINE_VAR uint32_t __oclc_ISA_version = 9000;
-}
-
-// These aliases cause clang to emit the control constants with ODR linkage.
-// This allows us to link against the symbols without preventing them from being
-// optimized out or causing symbol collisions.
-[[gnu::alias("__oclc_unsafe_math_opt")]] const uint8_t __oclc_unsafe_math_opt__;
-[[gnu::alias("__oclc_daz_opt")]] const uint8_t __oclc_daz_opt__;
-[[gnu::alias("__oclc_correctly_rounded_sqrt32")]] const uint8_t
-    __oclc_correctly_rounded_sqrt32__;
-[[gnu::alias("__oclc_finite_only_opt")]] const uint8_t __oclc_finite_only_opt__;
-[[gnu::alias("__oclc_ISA_version")]] const uint32_t __oclc_ISA_version__;
-
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LLVM_LIBC_SRC_MATH_AMDGPU_PLATFORM_H

diff  --git a/libc/src/math/amdgpu/powf.cpp b/libc/src/math/amdgpu/powf.cpp
deleted file mode 100644
index 6931934d4c11e..0000000000000
--- a/libc/src/math/amdgpu/powf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the powf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/powf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, powf, (float x, float y)) {
-  return __ocml_pow_f32(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/powi.cpp b/libc/src/math/amdgpu/powi.cpp
deleted file mode 100644
index 6b31b471e4b20..0000000000000
--- a/libc/src/math/amdgpu/powi.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the powi function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/powi.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
-
-#include "declarations.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, powi, (double x, int y)) {
-  return __ocml_pown_f64(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/powif.cpp b/libc/src/math/amdgpu/powif.cpp
deleted file mode 100644
index 94f8a91d9c03b..0000000000000
--- a/libc/src/math/amdgpu/powif.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the powi function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/powif.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
-
-#include "declarations.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, powif, (float x, int y)) {
-  return __ocml_pown_f32(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/remquo.cpp b/libc/src/math/amdgpu/remquo.cpp
deleted file mode 100644
index 42c908e91c6c0..0000000000000
--- a/libc/src/math/amdgpu/remquo.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-//===-- Implementation of the GPU remquo function -------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/remquo.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, remquo, (double x, double y, int *quo)) {
-  int tmp;
-  double r = __ocml_remquo_f64(x, y, (gpu::Private<int> *)&tmp);
-  *quo = tmp;
-  return r;
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/remquof.cpp b/libc/src/math/amdgpu/remquof.cpp
deleted file mode 100644
index 854d3bfe842fd..0000000000000
--- a/libc/src/math/amdgpu/remquof.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-//===-- Implementation of the GPU remquof function ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/remquof.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, remquof, (float x, float y, int *quo)) {
-  int tmp;
-  float r = __ocml_remquo_f32(x, y, (gpu::Private<int> *)&tmp);
-  *quo = tmp;
-  return r;
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/scalbn.cpp b/libc/src/math/amdgpu/scalbn.cpp
index 05bbbc69b47a1..3c3c19ea0d9d4 100644
--- a/libc/src/math/amdgpu/scalbn.cpp
+++ b/libc/src/math/amdgpu/scalbn.cpp
@@ -9,7 +9,6 @@
 #include "src/math/scalbn.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {

diff  --git a/libc/src/math/amdgpu/scalbnf.cpp b/libc/src/math/amdgpu/scalbnf.cpp
index f0e9e475674c3..c348aa7c3be22 100644
--- a/libc/src/math/amdgpu/scalbnf.cpp
+++ b/libc/src/math/amdgpu/scalbnf.cpp
@@ -9,7 +9,6 @@
 #include "src/math/scalbnf.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {

diff  --git a/libc/src/math/amdgpu/sin.cpp b/libc/src/math/amdgpu/sin.cpp
deleted file mode 100644
index f3d88af009ce4..0000000000000
--- a/libc/src/math/amdgpu/sin.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the sin function for GPU ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sin.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, sin, (double x)) { return __ocml_sin_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/sincos.cpp b/libc/src/math/amdgpu/sincos.cpp
deleted file mode 100644
index 304ac0c7c6332..0000000000000
--- a/libc/src/math/amdgpu/sincos.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the sincos function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sincos.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(void, sincos, (double x, double *sinptr, double *cosptr)) {
-  *sinptr = __ocml_sincos_f64(x, cosptr);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/sincosf.cpp b/libc/src/math/amdgpu/sincosf.cpp
deleted file mode 100644
index 1c4e9c6a2463f..0000000000000
--- a/libc/src/math/amdgpu/sincosf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the sincosf function for GPU --------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sincosf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(void, sincosf, (float x, float *sinptr, float *cosptr)) {
-  *sinptr = __ocml_sincos_f32(x, cosptr);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/sinf.cpp b/libc/src/math/amdgpu/sinf.cpp
deleted file mode 100644
index c6d64a63c755d..0000000000000
--- a/libc/src/math/amdgpu/sinf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the sinf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sinf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, sinf, (float x)) { return __ocml_sin_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/sinh.cpp b/libc/src/math/amdgpu/sinh.cpp
deleted file mode 100644
index 26314f46d0e97..0000000000000
--- a/libc/src/math/amdgpu/sinh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the sinh function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sinh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, sinh, (double x)) { return __ocml_sinh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/sinhf.cpp b/libc/src/math/amdgpu/sinhf.cpp
deleted file mode 100644
index a4eb8e1a65283..0000000000000
--- a/libc/src/math/amdgpu/sinhf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the sinhf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sinhf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, sinhf, (float x)) { return __ocml_sinh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/tan.cpp b/libc/src/math/amdgpu/tan.cpp
deleted file mode 100644
index c946dc2a3db67..0000000000000
--- a/libc/src/math/amdgpu/tan.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the tan function for GPU ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/tan.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, tan, (double x)) { return __ocml_tan_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/tanf.cpp b/libc/src/math/amdgpu/tanf.cpp
deleted file mode 100644
index 8c93fc4f62369..0000000000000
--- a/libc/src/math/amdgpu/tanf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the tanf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/tanf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, tanf, (float x)) { return __ocml_tan_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/tanh.cpp b/libc/src/math/amdgpu/tanh.cpp
deleted file mode 100644
index 834353e122abe..0000000000000
--- a/libc/src/math/amdgpu/tanh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the tanh function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/tanh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, tanh, (double x)) { return __ocml_tanh_f64(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/tanhf.cpp b/libc/src/math/amdgpu/tanhf.cpp
deleted file mode 100644
index 5029596a8e6fd..0000000000000
--- a/libc/src/math/amdgpu/tanhf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the tanhf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/tanhf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, tanhf, (float x)) { return __ocml_tanh_f32(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/tgamma.cpp b/libc/src/math/amdgpu/tgamma.cpp
index 485a6a3def432..0dfb0fd9ee13c 100644
--- a/libc/src/math/amdgpu/tgamma.cpp
+++ b/libc/src/math/amdgpu/tgamma.cpp
@@ -9,11 +9,10 @@
 #include "src/math/tgamma.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
-LLVM_LIBC_FUNCTION(double, tgamma, (double x)) { return __ocml_tgamma_f64(x); }
+LLVM_LIBC_FUNCTION(double, tgamma, (double)) { return 0.0; }
 
 } // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/amdgpu/tgammaf.cpp b/libc/src/math/amdgpu/tgammaf.cpp
index e48a486c9c5e5..9dd17ab8de917 100644
--- a/libc/src/math/amdgpu/tgammaf.cpp
+++ b/libc/src/math/amdgpu/tgammaf.cpp
@@ -9,11 +9,10 @@
 #include "src/math/tgammaf.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
-LLVM_LIBC_FUNCTION(float, tgammaf, (float x)) { return __ocml_tgamma_f32(x); }
+LLVM_LIBC_FUNCTION(float, tgammaf, (float)) { return 0.0f; }
 
 } // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/CMakeLists.txt b/libc/src/math/nvptx/CMakeLists.txt
index e85e17b6701fe..949232ea2aaea 100644
--- a/libc/src/math/nvptx/CMakeLists.txt
+++ b/libc/src/math/nvptx/CMakeLists.txt
@@ -287,164 +287,6 @@ add_entrypoint_object(
     -O2
 )
 
-# The following functions currently are not implemented natively and borrow from
-# existing implementations. This will be removed in the future.
-add_entrypoint_object(
-  acos
-  SRCS
-    acos.cpp
-  HDRS
-    ../acos.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  acosh
-  SRCS
-    acosh.cpp
-  HDRS
-    ../acosh.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  asin
-  SRCS
-    asin.cpp
-  HDRS
-    ../asin.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  asinh
-  SRCS
-    asinh.cpp
-  HDRS
-    ../asinh.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  atan
-  SRCS
-    atan.cpp
-  HDRS
-    ../atan.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  atanh
-  SRCS
-    atanh.cpp
-  HDRS
-    ../atanh.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  cos
-  SRCS
-    cos.cpp
-  HDRS
-    ../cos.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  cosh
-  SRCS
-    cosh.cpp
-  HDRS
-    ../cosh.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  erf
-  SRCS
-    erf.cpp
-  HDRS
-    ../erf.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  powi
-  SRCS
-    powi.cpp
-  HDRS
-    ../powi.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  powif
-  SRCS
-    powif.cpp
-  HDRS
-    ../powif.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  sinh
-  SRCS
-    sinh.cpp
-  HDRS
-    ../sinh.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
-add_entrypoint_object(
-  tanh
-  SRCS
-    tanh.cpp
-  HDRS
-    ../tanh.h
-  COMPILE_OPTIONS
-    ${bitcode_link_flags}
-    -O2
-  VENDOR
-)
-
 add_entrypoint_object(
   tgamma
   SRCS
@@ -454,7 +296,6 @@ add_entrypoint_object(
   COMPILE_OPTIONS
     ${bitcode_link_flags}
     -O2
-  VENDOR
 )
 
 add_entrypoint_object(
@@ -466,7 +307,6 @@ add_entrypoint_object(
   COMPILE_OPTIONS
     ${bitcode_link_flags}
     -O2
-  VENDOR
 )
 
 add_entrypoint_object(
@@ -478,7 +318,6 @@ add_entrypoint_object(
   COMPILE_OPTIONS
     ${bitcode_link_flags}
     -O2
-  VENDOR
 )
 
 add_entrypoint_object(
@@ -490,5 +329,4 @@ add_entrypoint_object(
   COMPILE_OPTIONS
     ${bitcode_link_flags}
     -O2
-  VENDOR
 )

diff  --git a/libc/src/math/nvptx/acos.cpp b/libc/src/math/nvptx/acos.cpp
deleted file mode 100644
index 7049f9fb31c55..0000000000000
--- a/libc/src/math/nvptx/acos.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU acos function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/acos.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, acos, (double x)) { return __nv_acos(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/acosf.cpp b/libc/src/math/nvptx/acosf.cpp
deleted file mode 100644
index cf70a0f3b923d..0000000000000
--- a/libc/src/math/nvptx/acosf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the acosf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/acosf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, acosf, (float x)) { return __nv_acosf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/acosh.cpp b/libc/src/math/nvptx/acosh.cpp
deleted file mode 100644
index 2628aa997d0b7..0000000000000
--- a/libc/src/math/nvptx/acosh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU acosh function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/acosh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, acosh, (double x)) { return __nv_acosh(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/acoshf.cpp b/libc/src/math/nvptx/acoshf.cpp
deleted file mode 100644
index b8f57fdc05c29..0000000000000
--- a/libc/src/math/nvptx/acoshf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the acoshf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/acoshf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, acoshf, (float x)) { return __nv_acoshf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/asin.cpp b/libc/src/math/nvptx/asin.cpp
deleted file mode 100644
index 417b67ac7da0a..0000000000000
--- a/libc/src/math/nvptx/asin.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU asin function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/asin.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, asin, (double x)) { return __nv_asin(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/asinf.cpp b/libc/src/math/nvptx/asinf.cpp
deleted file mode 100644
index ea819bdfd00ed..0000000000000
--- a/libc/src/math/nvptx/asinf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the asinf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/asinf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, asinf, (float x)) { return __nv_asinf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/asinh.cpp b/libc/src/math/nvptx/asinh.cpp
deleted file mode 100644
index 49dcd227bb4bd..0000000000000
--- a/libc/src/math/nvptx/asinh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU asinh function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/asinh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, asinh, (double x)) { return __nv_asinh(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/asinhf.cpp b/libc/src/math/nvptx/asinhf.cpp
deleted file mode 100644
index af8afe7590edf..0000000000000
--- a/libc/src/math/nvptx/asinhf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the asinhf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/asinhf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, asinhf, (float x)) { return __nv_asinhf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/atan.cpp b/libc/src/math/nvptx/atan.cpp
deleted file mode 100644
index e94ef5787ca45..0000000000000
--- a/libc/src/math/nvptx/atan.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU atan function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atan.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, atan, (double x)) { return __nv_atan(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/atan2.cpp b/libc/src/math/nvptx/atan2.cpp
deleted file mode 100644
index d12c4cb205d51..0000000000000
--- a/libc/src/math/nvptx/atan2.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the GPU atan2 function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atan2.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, atan2, (double x, double y)) {
-  return __nv_atan2(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/atan2f.cpp b/libc/src/math/nvptx/atan2f.cpp
deleted file mode 100644
index f39f3227b1d57..0000000000000
--- a/libc/src/math/nvptx/atan2f.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the GPU atan2f function -------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atan2f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, atan2f, (float x, float y)) {
-  return __nv_atan2f(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/atanf.cpp b/libc/src/math/nvptx/atanf.cpp
deleted file mode 100644
index f66ade7a438f3..0000000000000
--- a/libc/src/math/nvptx/atanf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the atanf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atanf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, atanf, (float x)) { return __nv_atanf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/atanh.cpp b/libc/src/math/nvptx/atanh.cpp
deleted file mode 100644
index a206d517af11f..0000000000000
--- a/libc/src/math/nvptx/atanh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU atanh function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atanh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, atanh, (double x)) { return __nv_atanh(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/atanhf.cpp b/libc/src/math/nvptx/atanhf.cpp
deleted file mode 100644
index 06f68833b3d26..0000000000000
--- a/libc/src/math/nvptx/atanhf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the atanhf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/atanhf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, atanhf, (float x)) { return __nv_atanhf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/cos.cpp b/libc/src/math/nvptx/cos.cpp
deleted file mode 100644
index 873fd50041b18..0000000000000
--- a/libc/src/math/nvptx/cos.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the cos function for GPU ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/cos.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, cos, (double x)) { return __nv_cos(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/cosf.cpp b/libc/src/math/nvptx/cosf.cpp
deleted file mode 100644
index 82b3bb759ba0b..0000000000000
--- a/libc/src/math/nvptx/cosf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the cosf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/cosf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, cosf, (float x)) { return __nv_cosf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/cosh.cpp b/libc/src/math/nvptx/cosh.cpp
deleted file mode 100644
index 434e8c56bbf7d..0000000000000
--- a/libc/src/math/nvptx/cosh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the cosh function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/cosh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, cosh, (double x)) { return __nv_cosh(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/coshf.cpp b/libc/src/math/nvptx/coshf.cpp
deleted file mode 100644
index 87d6b16ba8a3a..0000000000000
--- a/libc/src/math/nvptx/coshf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the coshf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/coshf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, coshf, (float x)) { return __nv_coshf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/declarations.h b/libc/src/math/nvptx/declarations.h
deleted file mode 100644
index 6f0bcfe7dce0f..0000000000000
--- a/libc/src/math/nvptx/declarations.h
+++ /dev/null
@@ -1,94 +0,0 @@
-//===-- NVPTX specific declarations for math support ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_MATH_NVPTX_DECLARATIONS_H
-#define LLVM_LIBC_SRC_MATH_NVPTX_DECLARATIONS_H
-
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-extern "C" {
-double __nv_acos(double);
-float __nv_acosf(float);
-double __nv_acosh(double);
-float __nv_acoshf(float);
-double __nv_asin(double);
-float __nv_asinf(float);
-double __nv_asinh(double);
-float __nv_asinhf(float);
-double __nv_atan(double);
-float __nv_atanf(float);
-double __nv_atan2(double, double);
-float __nv_atan2f(float, float);
-double __nv_atanh(double);
-float __nv_atanhf(float);
-double __nv_cos(double);
-float __nv_cosf(float);
-double __nv_cosh(double);
-float __nv_coshf(float);
-double __nv_erf(double);
-float __nv_erff(float);
-double __nv_exp(double);
-float __nv_expf(float);
-double __nv_exp2(double);
-float __nv_exp2f(float);
-double __nv_exp10(double);
-float __nv_exp10f(float);
-double __nv_expm1(double);
-float __nv_expm1f(float);
-double __nv_fdim(double, double);
-float __nv_fdimf(float, float);
-double __nv_hypot(double, double);
-float __nv_hypotf(float, float);
-int __nv_ilogb(double);
-int __nv_ilogbf(float);
-double __nv_ldexp(double, int);
-float __nv_ldexpf(float, int);
-long long __nv_llrint(double);
-long long __nv_llrintf(float);
-long __nv_lrint(double);
-long __nv_lrintf(float);
-double __nv_log10(double);
-float __nv_log10f(float);
-double __nv_log1p(double);
-float __nv_log1pf(float);
-double __nv_log2(double);
-float __nv_log2f(float);
-double __nv_log(double);
-float __nv_logf(float);
-double __nv_nextafter(double, double);
-float __nv_nextafterf(float, float);
-double __nv_pow(double, double);
-float __nv_powf(float, float);
-double __nv_powi(double, int);
-float __nv_powif(float, int);
-double __nv_sin(double);
-float __nv_sinf(float);
-void __nv_sincos(double, double *, double *);
-void __nv_sincosf(float, float *, float *);
-double __nv_sinh(double);
-float __nv_sinhf(float);
-double __nv_tan(double);
-float __nv_tanf(float);
-double __nv_tanh(double);
-float __nv_tanhf(float);
-double __nv_frexp(double, int *);
-float __nv_frexpf(float, int *);
-double __nv_scalbn(double, int);
-float __nv_scalbnf(float, int);
-double __nv_remquo(double, double, int *);
-float __nv_remquof(float, float, int *);
-double __nv_tgamma(double);
-float __nv_tgammaf(float);
-float __nv_lgamma(double);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LLVM_LIBC_SRC_MATH_NVPTX_DECLARATIONS_H

diff  --git a/libc/src/math/nvptx/erf.cpp b/libc/src/math/nvptx/erf.cpp
deleted file mode 100644
index c7ca7d42fe8a8..0000000000000
--- a/libc/src/math/nvptx/erf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU erf function ----------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/erf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, erf, (double x)) { return __nv_erf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/erff.cpp b/libc/src/math/nvptx/erff.cpp
deleted file mode 100644
index 1c64e07c3370d..0000000000000
--- a/libc/src/math/nvptx/erff.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU erff function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/erff.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, erff, (float x)) { return __nv_erff(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/exp.cpp b/libc/src/math/nvptx/exp.cpp
deleted file mode 100644
index dcbadcf2ae8d4..0000000000000
--- a/libc/src/math/nvptx/exp.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU exp function ----------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, exp, (double x)) { return __nv_exp(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/exp10.cpp b/libc/src/math/nvptx/exp10.cpp
deleted file mode 100644
index 0972a3c4ae462..0000000000000
--- a/libc/src/math/nvptx/exp10.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU exp10 function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp10.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, exp10, (double x)) { return __nv_exp10(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/exp10f.cpp b/libc/src/math/nvptx/exp10f.cpp
deleted file mode 100644
index 0709771fc99a8..0000000000000
--- a/libc/src/math/nvptx/exp10f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the exp10f function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp10f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, exp10f, (float x)) { return __nv_exp10f(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/exp2.cpp b/libc/src/math/nvptx/exp2.cpp
deleted file mode 100644
index 3465e5b608fa9..0000000000000
--- a/libc/src/math/nvptx/exp2.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU exp2 function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp2.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, exp2, (double x)) { return __nv_exp2(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/exp2f.cpp b/libc/src/math/nvptx/exp2f.cpp
deleted file mode 100644
index 05257648c2e0e..0000000000000
--- a/libc/src/math/nvptx/exp2f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the exp2f function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/exp2f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, exp2f, (float x)) { return __nv_exp2f(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/expf.cpp b/libc/src/math/nvptx/expf.cpp
deleted file mode 100644
index 2b802e5c3555f..0000000000000
--- a/libc/src/math/nvptx/expf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the expf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/expf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, expf, (float x)) { return __nv_expf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/expm1.cpp b/libc/src/math/nvptx/expm1.cpp
deleted file mode 100644
index 91845cffc5fd5..0000000000000
--- a/libc/src/math/nvptx/expm1.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU expm1 function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/expm1.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, expm1, (double x)) { return __nv_expm1(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/expm1f.cpp b/libc/src/math/nvptx/expm1f.cpp
deleted file mode 100644
index 31e67af084fdb..0000000000000
--- a/libc/src/math/nvptx/expm1f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the expm1f function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/expm1f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, expm1f, (float x)) { return __nv_expm1f(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/fdim.cpp b/libc/src/math/nvptx/fdim.cpp
deleted file mode 100644
index edf4009273234..0000000000000
--- a/libc/src/math/nvptx/fdim.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the fdim function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/fdim.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, fdim, (double x, double y)) {
-  return __nv_fdim(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/fdimf.cpp b/libc/src/math/nvptx/fdimf.cpp
deleted file mode 100644
index 017143aaebc8b..0000000000000
--- a/libc/src/math/nvptx/fdimf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the fdimf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/fdimf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, fdimf, (float x, float y)) {
-  return __nv_fdimf(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/frexp.cpp b/libc/src/math/nvptx/frexp.cpp
deleted file mode 100644
index edba8d712aedb..0000000000000
--- a/libc/src/math/nvptx/frexp.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the frexp function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/frexp.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, frexp, (double x, int *p)) {
-  return __nv_frexp(x, p);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/frexpf.cpp b/libc/src/math/nvptx/frexpf.cpp
deleted file mode 100644
index 04619412c160f..0000000000000
--- a/libc/src/math/nvptx/frexpf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the frexpf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/frexpf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, frexpf, (float x, int *p)) {
-  return __nv_frexpf(x, p);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/hypot.cpp b/libc/src/math/nvptx/hypot.cpp
deleted file mode 100644
index a7bacd6b1a85a..0000000000000
--- a/libc/src/math/nvptx/hypot.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the hypot function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/hypot.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, hypot, (double x, double y)) {
-  return __nv_hypot(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/hypotf.cpp b/libc/src/math/nvptx/hypotf.cpp
deleted file mode 100644
index 49e85a11a0c16..0000000000000
--- a/libc/src/math/nvptx/hypotf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the hypotf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/hypotf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, hypotf, (float x, float y)) {
-  return __nv_hypotf(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/ilogb.cpp b/libc/src/math/nvptx/ilogb.cpp
deleted file mode 100644
index 3d552c2130af1..0000000000000
--- a/libc/src/math/nvptx/ilogb.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the ilogb function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/ilogb.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(int, ilogb, (double x)) { return __nv_ilogb(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/ilogbf.cpp b/libc/src/math/nvptx/ilogbf.cpp
deleted file mode 100644
index a78926f95d6da..0000000000000
--- a/libc/src/math/nvptx/ilogbf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the ilogbf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/ilogbf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(int, ilogbf, (float x)) { return __nv_ilogbf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/ldexp.cpp b/libc/src/math/nvptx/ldexp.cpp
deleted file mode 100644
index 0adc7c3f57f00..0000000000000
--- a/libc/src/math/nvptx/ldexp.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the ldexp function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/ldexp.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, ldexp, (double x, int y)) {
-  return __nv_ldexp(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/ldexpf.cpp b/libc/src/math/nvptx/ldexpf.cpp
deleted file mode 100644
index eb7dd42853153..0000000000000
--- a/libc/src/math/nvptx/ldexpf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the ldexpf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/ldexpf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, ldexpf, (float x, int y)) {
-  return __nv_ldexpf(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/lgamma.cpp b/libc/src/math/nvptx/lgamma.cpp
index 0447a97eeae75..0dc3111c6ae12 100644
--- a/libc/src/math/nvptx/lgamma.cpp
+++ b/libc/src/math/nvptx/lgamma.cpp
@@ -9,11 +9,10 @@
 #include "src/math/lgamma.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
-LLVM_LIBC_FUNCTION(double, lgamma, (double x)) { return __nv_lgamma(x); }
+LLVM_LIBC_FUNCTION(double, lgamma, (double)) { return 0.0; }
 
 } // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/lgamma_r.cpp b/libc/src/math/nvptx/lgamma_r.cpp
index 85f66c8ea5d29..92018da4f860f 100644
--- a/libc/src/math/nvptx/lgamma_r.cpp
+++ b/libc/src/math/nvptx/lgamma_r.cpp
@@ -9,15 +9,13 @@
 #include "src/math/lgamma_r.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
-LLVM_LIBC_FUNCTION(double, lgamma_r, (double x, int *signp)) {
-  double result = __nv_lgamma(x);
-  *signp = (result < 0.0) ? -1 : 1;
-  return result;
+LLVM_LIBC_FUNCTION(double, lgamma_r, (double, int *signp)) {
+  *signp = 0.0;
+  return 0.0;
 }
 
 } // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/llrint.cpp b/libc/src/math/nvptx/llrint.cpp
index 21129fe80a0c1..6e0f57a5a0387 100644
--- a/libc/src/math/nvptx/llrint.cpp
+++ b/libc/src/math/nvptx/llrint.cpp
@@ -9,7 +9,6 @@
 #include "src/math/llrint.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {

diff  --git a/libc/src/math/nvptx/llrintf.cpp b/libc/src/math/nvptx/llrintf.cpp
index a6f9f43876010..d8de23fac3c8b 100644
--- a/libc/src/math/nvptx/llrintf.cpp
+++ b/libc/src/math/nvptx/llrintf.cpp
@@ -9,7 +9,6 @@
 #include "src/math/llrintf.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {

diff  --git a/libc/src/math/nvptx/log.cpp b/libc/src/math/nvptx/log.cpp
deleted file mode 100644
index fd556ac1e165a..0000000000000
--- a/libc/src/math/nvptx/log.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log function ----------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, log, (double x)) { return __nv_log(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/log10.cpp b/libc/src/math/nvptx/log10.cpp
deleted file mode 100644
index fbbf214167c1f..0000000000000
--- a/libc/src/math/nvptx/log10.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log10 function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log10.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, log10, (double x)) { return __nv_log10(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/log10f.cpp b/libc/src/math/nvptx/log10f.cpp
deleted file mode 100644
index c2f24df043ab5..0000000000000
--- a/libc/src/math/nvptx/log10f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log10f function -------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log10f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, log10f, (float x)) { return __nv_log10f(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/log1p.cpp b/libc/src/math/nvptx/log1p.cpp
deleted file mode 100644
index 2ffd0fee57170..0000000000000
--- a/libc/src/math/nvptx/log1p.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log1p function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log1p.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, log1p, (double x)) { return __nv_log1p(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/log1pf.cpp b/libc/src/math/nvptx/log1pf.cpp
deleted file mode 100644
index 2de4f27ff20c0..0000000000000
--- a/libc/src/math/nvptx/log1pf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log1pf function -------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log1pf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, log1pf, (float x)) { return __nv_log1pf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/log2.cpp b/libc/src/math/nvptx/log2.cpp
deleted file mode 100644
index 54e2da0c9efa6..0000000000000
--- a/libc/src/math/nvptx/log2.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log2 function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log2.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, log2, (double x)) { return __nv_log2(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/log2f.cpp b/libc/src/math/nvptx/log2f.cpp
deleted file mode 100644
index c2a6054c797ff..0000000000000
--- a/libc/src/math/nvptx/log2f.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU log2f function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/log2f.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, log2f, (float x)) { return __nv_log2f(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/logb.cpp b/libc/src/math/nvptx/logb.cpp
deleted file mode 100644
index f6998bd194887..0000000000000
--- a/libc/src/math/nvptx/logb.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU logb function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/logb.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, logb, (double x)) { return __nv_logb(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/logbf.cpp b/libc/src/math/nvptx/logbf.cpp
deleted file mode 100644
index f72c04f988b6a..0000000000000
--- a/libc/src/math/nvptx/logbf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU logbf function --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/logbf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, logbf, (float x)) { return __nv_logbf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/logf.cpp b/libc/src/math/nvptx/logf.cpp
deleted file mode 100644
index 1a5bc1e8fc1b1..0000000000000
--- a/libc/src/math/nvptx/logf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the GPU logf function ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/logf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, logf, (float x)) { return __nv_logf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/lrint.cpp b/libc/src/math/nvptx/lrint.cpp
index 715b552575789..5ba70ec890b2c 100644
--- a/libc/src/math/nvptx/lrint.cpp
+++ b/libc/src/math/nvptx/lrint.cpp
@@ -9,7 +9,6 @@
 #include "src/math/lrint.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {

diff  --git a/libc/src/math/nvptx/lrintf.cpp b/libc/src/math/nvptx/lrintf.cpp
deleted file mode 100644
index 3ed05f6ca34cc..0000000000000
--- a/libc/src/math/nvptx/lrintf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the lrintf function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/lrintf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(long, lrintf, (float x)) { return __nv_lrintf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/nextafter.cpp b/libc/src/math/nvptx/nextafter.cpp
deleted file mode 100644
index 3dc910042192d..0000000000000
--- a/libc/src/math/nvptx/nextafter.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the nextafter function for GPU ------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/nextafter.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, nextafter, (double x, double y)) {
-  return __nv_nextafter(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/nextafterf.cpp b/libc/src/math/nvptx/nextafterf.cpp
deleted file mode 100644
index 162b85ef76c1f..0000000000000
--- a/libc/src/math/nvptx/nextafterf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the nextafterf function for GPU -----------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/nextafterf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, nextafterf, (float x, float y)) {
-  return __nv_nextafterf(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/nvptx.h b/libc/src/math/nvptx/nvptx.h
deleted file mode 100644
index 2035b766e6227..0000000000000
--- a/libc/src/math/nvptx/nvptx.h
+++ /dev/null
@@ -1,103 +0,0 @@
-//===-- NVPTX specific definitions for math support -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_MATH_NVPTX_NVPTX_H
-#define LLVM_LIBC_SRC_MATH_NVPTX_NVPTX_H
-
-#include "declarations.h"
-
-#include "src/__support/macros/attributes.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-namespace internal {
-LIBC_INLINE double acos(double x) { return __nv_acos(x); }
-LIBC_INLINE float acosf(float x) { return __nv_acosf(x); }
-LIBC_INLINE double acosh(double x) { return __nv_acosh(x); }
-LIBC_INLINE float acoshf(float x) { return __nv_acoshf(x); }
-LIBC_INLINE double asin(double x) { return __nv_asin(x); }
-LIBC_INLINE float asinf(float x) { return __nv_asinf(x); }
-LIBC_INLINE double asinh(double x) { return __nv_asinh(x); }
-LIBC_INLINE float asinhf(float x) { return __nv_asinhf(x); }
-LIBC_INLINE double atan2(double x, double y) { return __nv_atan2(x, y); }
-LIBC_INLINE float atan2f(float x, float y) { return __nv_atan2f(x, y); }
-LIBC_INLINE double atan(double x) { return __nv_atan(x); }
-LIBC_INLINE float atanf(float x) { return __nv_atanf(x); }
-LIBC_INLINE double atanh(double x) { return __nv_atanh(x); }
-LIBC_INLINE float atanhf(float x) { return __nv_atanhf(x); }
-LIBC_INLINE double cos(double x) { return __nv_cos(x); }
-LIBC_INLINE float cosf(float x) { return __nv_cosf(x); }
-LIBC_INLINE double cosh(double x) { return __nv_cosh(x); }
-LIBC_INLINE float coshf(float x) { return __nv_coshf(x); }
-LIBC_INLINE double erf(double x) { return __nv_erf(x); }
-LIBC_INLINE float erff(float x) { return __nv_erff(x); }
-LIBC_INLINE double exp(double x) { return __nv_exp(x); }
-LIBC_INLINE float expf(float x) { return __nv_expf(x); }
-LIBC_INLINE double exp2(double x) { return __nv_exp2(x); }
-LIBC_INLINE float exp2f(float x) { return __nv_exp2f(x); }
-LIBC_INLINE double exp10(double x) { return __nv_exp10(x); }
-LIBC_INLINE float exp10f(float x) { return __nv_exp10f(x); }
-LIBC_INLINE double expm1(double x) { return __nv_expm1(x); }
-LIBC_INLINE float expm1f(float x) { return __nv_expm1f(x); }
-LIBC_INLINE double fdim(double x, double y) { return __nv_fdim(x, y); }
-LIBC_INLINE float fdimf(float x, float y) { return __nv_fdimf(x, y); }
-LIBC_INLINE double hypot(double x, double y) { return __nv_hypot(x, y); }
-LIBC_INLINE float hypotf(float x, float y) { return __nv_hypotf(x, y); }
-LIBC_INLINE int ilogb(double x) { return __nv_ilogb(x); }
-LIBC_INLINE int ilogbf(float x) { return __nv_ilogbf(x); }
-LIBC_INLINE double ldexp(double x, int i) { return __nv_ldexp(x, i); }
-LIBC_INLINE float ldexpf(float x, int i) { return __nv_ldexpf(x, i); }
-LIBC_INLINE long long llrint(double x) { return __nv_llrint(x); }
-LIBC_INLINE long long llrintf(float x) { return __nv_llrintf(x); }
-LIBC_INLINE double log10(double x) { return __nv_log10(x); }
-LIBC_INLINE float log10f(float x) { return __nv_log10f(x); }
-LIBC_INLINE double log1p(double x) { return __nv_log1p(x); }
-LIBC_INLINE float log1pf(float x) { return __nv_log1pf(x); }
-LIBC_INLINE double log2(double x) { return __nv_log2(x); }
-LIBC_INLINE float log2f(float x) { return __nv_log2f(x); }
-LIBC_INLINE double log(double x) { return __nv_log(x); }
-LIBC_INLINE float logf(float x) { return __nv_logf(x); }
-LIBC_INLINE long lrint(double x) { return __nv_lrint(x); }
-LIBC_INLINE long lrintf(float x) { return __nv_lrintf(x); }
-LIBC_INLINE double nextafter(double x, double y) {
-  return __nv_nextafter(x, y);
-}
-LIBC_INLINE float nextafterf(float x, float y) { return __nv_nextafterf(x, y); }
-LIBC_INLINE double pow(double x, double y) { return __nv_pow(x, y); }
-LIBC_INLINE float powf(float x, float y) { return __nv_powf(x, y); }
-LIBC_INLINE double sin(double x) { return __nv_sin(x); }
-LIBC_INLINE float sinf(float x) { return __nv_sinf(x); }
-LIBC_INLINE void sincos(double x, double *sinptr, double *cosptr) {
-  return __nv_sincos(x, sinptr, cosptr);
-}
-LIBC_INLINE void sincosf(float x, float *sinptr, float *cosptr) {
-  return __nv_sincosf(x, sinptr, cosptr);
-}
-LIBC_INLINE double sinh(double x) { return __nv_sinh(x); }
-LIBC_INLINE float sinhf(float x) { return __nv_sinhf(x); }
-LIBC_INLINE double tan(double x) { return __nv_tan(x); }
-LIBC_INLINE float tanf(float x) { return __nv_tanf(x); }
-LIBC_INLINE double tanh(double x) { return __nv_tanh(x); }
-LIBC_INLINE float tanhf(float x) { return __nv_tanhf(x); }
-LIBC_INLINE double scalbn(double x, int i) { return __nv_scalbn(x, i); }
-LIBC_INLINE float scalbnf(float x, int i) { return __nv_scalbnf(x, i); }
-LIBC_INLINE double frexp(double x, int *i) { return __nv_frexp(x, i); }
-LIBC_INLINE float frexpf(float x, int *i) { return __nv_frexpf(x, i); }
-LIBC_INLINE double remquo(double x, double y, int *i) {
-  return __nv_remquo(x, y, i);
-}
-LIBC_INLINE float remquof(float x, float y, int *i) {
-  return __nv_remquof(x, y, i);
-}
-LIBC_INLINE double tgamma(double x) { return __nv_tgamma(x); }
-LIBC_INLINE float tgammaf(float x) { return __nv_tgammaf(x); }
-
-} // namespace internal
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LLVM_LIBC_SRC_MATH_NVPTX_NVPTX_H

diff  --git a/libc/src/math/nvptx/powf.cpp b/libc/src/math/nvptx/powf.cpp
deleted file mode 100644
index 9c577c78a4a87..0000000000000
--- a/libc/src/math/nvptx/powf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the powf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/powf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, powf, (float x, float y)) { return __nv_powf(x, y); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/powi.cpp b/libc/src/math/nvptx/powi.cpp
deleted file mode 100644
index 16214bd9cc27a..0000000000000
--- a/libc/src/math/nvptx/powi.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the powi function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/powi.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
-
-#include "declarations.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, powi, (double x, int y)) { return __nv_powi(x, y); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/powif.cpp b/libc/src/math/nvptx/powif.cpp
deleted file mode 100644
index 5d26fdc87daca..0000000000000
--- a/libc/src/math/nvptx/powif.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the powif function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/powif.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
-
-#include "declarations.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, powif, (float x, int y)) { return __nv_powif(x, y); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/remquo.cpp b/libc/src/math/nvptx/remquo.cpp
deleted file mode 100644
index aae1831bce61a..0000000000000
--- a/libc/src/math/nvptx/remquo.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the GPU remquo function -------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/remquo.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, remquo, (double x, double y, int *quo)) {
-  return __nv_remquo(x, y, quo);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/remquof.cpp b/libc/src/math/nvptx/remquof.cpp
deleted file mode 100644
index d7ce3c0f03b52..0000000000000
--- a/libc/src/math/nvptx/remquof.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the GPU remquof function ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/remquof.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, remquof, (float x, float y, int *quo)) {
-  return __nv_remquof(x, y, quo);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/scalbn.cpp b/libc/src/math/nvptx/scalbn.cpp
deleted file mode 100644
index ecadc345a3534..0000000000000
--- a/libc/src/math/nvptx/scalbn.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the GPU scalbn function -------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/scalbn.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, scalbn, (double x, int y)) {
-  return __nv_scalbn(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/scalbnf.cpp b/libc/src/math/nvptx/scalbnf.cpp
deleted file mode 100644
index 35ff69964fffa..0000000000000
--- a/libc/src/math/nvptx/scalbnf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the GPU scalbnf function ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/scalbnf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, scalbnf, (float x, int y)) {
-  return __nv_scalbnf(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/sin.cpp b/libc/src/math/nvptx/sin.cpp
deleted file mode 100644
index 0e86f9c77e599..0000000000000
--- a/libc/src/math/nvptx/sin.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the sin function for GPU ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sin.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, sin, (double x)) { return __nv_sin(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/sincos.cpp b/libc/src/math/nvptx/sincos.cpp
deleted file mode 100644
index 5a77234e2d74e..0000000000000
--- a/libc/src/math/nvptx/sincos.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the sincos function for GPU ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sincos.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(void, sincos, (double x, double *sinptr, double *cosptr)) {
-  return __nv_sincos(x, sinptr, cosptr);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/sincosf.cpp b/libc/src/math/nvptx/sincosf.cpp
deleted file mode 100644
index e4039ada837b9..0000000000000
--- a/libc/src/math/nvptx/sincosf.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- Implementation of the sincosf function for GPU --------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sincosf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(void, sincosf, (float x, float *sinptr, float *cosptr)) {
-  return __nv_sincosf(x, sinptr, cosptr);
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/sinf.cpp b/libc/src/math/nvptx/sinf.cpp
deleted file mode 100644
index 14e722fbad196..0000000000000
--- a/libc/src/math/nvptx/sinf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the sinf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sinf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, sinf, (float x)) { return __nv_sinf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/sinh.cpp b/libc/src/math/nvptx/sinh.cpp
deleted file mode 100644
index 701811d9a9921..0000000000000
--- a/libc/src/math/nvptx/sinh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the sinh function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sinh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, sinh, (double x)) { return __nv_sinh(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/sinhf.cpp b/libc/src/math/nvptx/sinhf.cpp
deleted file mode 100644
index 2c6ac21fffa17..0000000000000
--- a/libc/src/math/nvptx/sinhf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the sinhf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/sinhf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, sinhf, (float x)) { return __nv_sinhf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/tan.cpp b/libc/src/math/nvptx/tan.cpp
deleted file mode 100644
index 2d3f1fe51ea4a..0000000000000
--- a/libc/src/math/nvptx/tan.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the tan function for GPU ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/tan.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, tan, (double x)) { return __nv_tan(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/tanf.cpp b/libc/src/math/nvptx/tanf.cpp
deleted file mode 100644
index bdf51d9a619a1..0000000000000
--- a/libc/src/math/nvptx/tanf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the tanf function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/tanf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, tanf, (float x)) { return __nv_tanf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/tanh.cpp b/libc/src/math/nvptx/tanh.cpp
deleted file mode 100644
index 8255889e7d2b3..0000000000000
--- a/libc/src/math/nvptx/tanh.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the tanh function for GPU -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/tanh.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, tanh, (double x)) { return __nv_tanh(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/tanhf.cpp b/libc/src/math/nvptx/tanhf.cpp
deleted file mode 100644
index a22524a0fa426..0000000000000
--- a/libc/src/math/nvptx/tanhf.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- Implementation of the tanhf function for GPU ----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/math/tanhf.h"
-#include "src/__support/common.h"
-
-#include "declarations.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(float, tanhf, (float x)) { return __nv_tanhf(x); }
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/tgamma.cpp b/libc/src/math/nvptx/tgamma.cpp
index 29f0334f72749..0dfb0fd9ee13c 100644
--- a/libc/src/math/nvptx/tgamma.cpp
+++ b/libc/src/math/nvptx/tgamma.cpp
@@ -9,11 +9,10 @@
 #include "src/math/tgamma.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
-LLVM_LIBC_FUNCTION(double, tgamma, (double x)) { return __nv_tgamma(x); }
+LLVM_LIBC_FUNCTION(double, tgamma, (double)) { return 0.0; }
 
 } // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/nvptx/tgammaf.cpp b/libc/src/math/nvptx/tgammaf.cpp
index d7de80b36d294..bb77cf56600b4 100644
--- a/libc/src/math/nvptx/tgammaf.cpp
+++ b/libc/src/math/nvptx/tgammaf.cpp
@@ -9,11 +9,10 @@
 #include "src/math/tgammaf.h"
 #include "src/__support/common.h"
 
-#include "declarations.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
-LLVM_LIBC_FUNCTION(float, tgammaf, (float x)) { return __nv_tgammaf(x); }
+LLVM_LIBC_FUNCTION(float, tgammaf, (float)) { return 0.0; }
 
 } // namespace LIBC_NAMESPACE_DECL


        


More information about the libc-commits mailing list