Skip to content

Conversation

@jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Jun 6, 2025

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

Summary:
This patch cleans up the leftoever files that were either implemented or
are still unimplemented stubs.
@llvmbot
Copy link
Member

llvmbot commented Jun 6, 2025

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

Changes

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


Patch is 147.41 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/143173.diff

161 Files Affected:

  • (modified) libc/cmake/modules/LLVMLibCLibraryRules.cmake (+3-6)
  • (modified) libc/cmake/modules/LLVMLibCObjectRules.cmake (+3-11)
  • (modified) libc/cmake/modules/LLVMLibCTestRules.cmake (-4)
  • (modified) libc/config/gpu/amdgpu/entrypoints.txt (-10)
  • (modified) libc/config/gpu/nvptx/entrypoints.txt (-10)
  • (modified) libc/src/math/amdgpu/CMakeLists.txt (-150)
  • (removed) libc/src/math/amdgpu/acos.cpp (-19)
  • (removed) libc/src/math/amdgpu/acosf.cpp (-19)
  • (removed) libc/src/math/amdgpu/acosh.cpp (-19)
  • (removed) libc/src/math/amdgpu/acoshf.cpp (-19)
  • (removed) libc/src/math/amdgpu/asin.cpp (-19)
  • (removed) libc/src/math/amdgpu/asinf.cpp (-19)
  • (removed) libc/src/math/amdgpu/asinh.cpp (-19)
  • (removed) libc/src/math/amdgpu/asinhf.cpp (-19)
  • (removed) libc/src/math/amdgpu/atan.cpp (-19)
  • (removed) libc/src/math/amdgpu/atan2.cpp (-21)
  • (removed) libc/src/math/amdgpu/atan2f.cpp (-21)
  • (removed) libc/src/math/amdgpu/atanf.cpp (-19)
  • (removed) libc/src/math/amdgpu/atanh.cpp (-19)
  • (removed) libc/src/math/amdgpu/atanhf.cpp (-19)
  • (removed) libc/src/math/amdgpu/cos.cpp (-19)
  • (removed) libc/src/math/amdgpu/cosf.cpp (-19)
  • (removed) libc/src/math/amdgpu/cosh.cpp (-19)
  • (removed) libc/src/math/amdgpu/coshf.cpp (-19)
  • (removed) libc/src/math/amdgpu/declarations.h (-91)
  • (removed) libc/src/math/amdgpu/erf.cpp (-19)
  • (removed) libc/src/math/amdgpu/erff.cpp (-19)
  • (removed) libc/src/math/amdgpu/exp.cpp (-19)
  • (removed) libc/src/math/amdgpu/exp10.cpp (-19)
  • (removed) libc/src/math/amdgpu/exp10f.cpp (-19)
  • (removed) libc/src/math/amdgpu/exp2.cpp (-19)
  • (removed) libc/src/math/amdgpu/exp2f.cpp (-19)
  • (removed) libc/src/math/amdgpu/expf.cpp (-19)
  • (removed) libc/src/math/amdgpu/expm1.cpp (-19)
  • (removed) libc/src/math/amdgpu/expm1f.cpp (-19)
  • (removed) libc/src/math/amdgpu/fdim.cpp (-21)
  • (removed) libc/src/math/amdgpu/fdimf.cpp (-21)
  • (modified) libc/src/math/amdgpu/frexp.cpp (-1)
  • (modified) libc/src/math/amdgpu/frexpf.cpp (-1)
  • (removed) libc/src/math/amdgpu/hypot.cpp (-21)
  • (removed) libc/src/math/amdgpu/hypotf.cpp (-21)
  • (removed) libc/src/math/amdgpu/ilogb.cpp (-19)
  • (removed) libc/src/math/amdgpu/ilogbf.cpp (-19)
  • (modified) libc/src/math/amdgpu/ldexp.cpp (-1)
  • (modified) libc/src/math/amdgpu/ldexpf.cpp (-1)
  • (modified) libc/src/math/amdgpu/lgamma.cpp (+2-2)
  • (modified) libc/src/math/amdgpu/lgamma_r.cpp (+3-6)
  • (modified) libc/src/math/amdgpu/llrint.cpp (-1)
  • (modified) libc/src/math/amdgpu/llrintf.cpp (-1)
  • (removed) libc/src/math/amdgpu/log.cpp (-19)
  • (removed) libc/src/math/amdgpu/log10.cpp (-19)
  • (removed) libc/src/math/amdgpu/log10f.cpp (-19)
  • (removed) libc/src/math/amdgpu/log1p.cpp (-19)
  • (removed) libc/src/math/amdgpu/log1pf.cpp (-19)
  • (removed) libc/src/math/amdgpu/log2.cpp (-19)
  • (removed) libc/src/math/amdgpu/log2f.cpp (-19)
  • (removed) libc/src/math/amdgpu/logb.cpp (-19)
  • (removed) libc/src/math/amdgpu/logbf.cpp (-19)
  • (removed) libc/src/math/amdgpu/logf.cpp (-19)
  • (modified) libc/src/math/amdgpu/lrint.cpp (-1)
  • (modified) libc/src/math/amdgpu/lrintf.cpp (-1)
  • (removed) libc/src/math/amdgpu/nextafter.cpp (-21)
  • (removed) libc/src/math/amdgpu/nextafterf.cpp (-21)
  • (removed) libc/src/math/amdgpu/platform.h (-55)
  • (removed) libc/src/math/amdgpu/powf.cpp (-21)
  • (removed) libc/src/math/amdgpu/powi.cpp (-21)
  • (removed) libc/src/math/amdgpu/powif.cpp (-21)
  • (removed) libc/src/math/amdgpu/remquo.cpp (-24)
  • (removed) libc/src/math/amdgpu/remquof.cpp (-24)
  • (modified) libc/src/math/amdgpu/scalbn.cpp (-1)
  • (modified) libc/src/math/amdgpu/scalbnf.cpp (-1)
  • (removed) libc/src/math/amdgpu/sin.cpp (-19)
  • (removed) libc/src/math/amdgpu/sincos.cpp (-21)
  • (removed) libc/src/math/amdgpu/sincosf.cpp (-21)
  • (removed) libc/src/math/amdgpu/sinf.cpp (-19)
  • (removed) libc/src/math/amdgpu/sinh.cpp (-19)
  • (removed) libc/src/math/amdgpu/sinhf.cpp (-19)
  • (removed) libc/src/math/amdgpu/tan.cpp (-19)
  • (removed) libc/src/math/amdgpu/tanf.cpp (-19)
  • (removed) libc/src/math/amdgpu/tanh.cpp (-19)
  • (removed) libc/src/math/amdgpu/tanhf.cpp (-19)
  • (modified) libc/src/math/amdgpu/tgamma.cpp (+1-2)
  • (modified) libc/src/math/amdgpu/tgammaf.cpp (+1-2)
  • (modified) libc/src/math/nvptx/CMakeLists.txt (-162)
  • (removed) libc/src/math/nvptx/acos.cpp (-19)
  • (removed) libc/src/math/nvptx/acosf.cpp (-19)
  • (removed) libc/src/math/nvptx/acosh.cpp (-19)
  • (removed) libc/src/math/nvptx/acoshf.cpp (-19)
  • (removed) libc/src/math/nvptx/asin.cpp (-19)
  • (removed) libc/src/math/nvptx/asinf.cpp (-19)
  • (removed) libc/src/math/nvptx/asinh.cpp (-19)
  • (removed) libc/src/math/nvptx/asinhf.cpp (-19)
  • (removed) libc/src/math/nvptx/atan.cpp (-19)
  • (removed) libc/src/math/nvptx/atan2.cpp (-21)
  • (removed) libc/src/math/nvptx/atan2f.cpp (-21)
  • (removed) libc/src/math/nvptx/atanf.cpp (-19)
  • (removed) libc/src/math/nvptx/atanh.cpp (-19)
  • (removed) libc/src/math/nvptx/atanhf.cpp (-19)
  • (removed) libc/src/math/nvptx/cos.cpp (-19)
  • (removed) libc/src/math/nvptx/cosf.cpp (-19)
  • (removed) libc/src/math/nvptx/cosh.cpp (-19)
  • (removed) libc/src/math/nvptx/coshf.cpp (-19)
  • (removed) libc/src/math/nvptx/declarations.h (-94)
  • (removed) libc/src/math/nvptx/erf.cpp (-19)
  • (removed) libc/src/math/nvptx/erff.cpp (-19)
  • (removed) libc/src/math/nvptx/exp.cpp (-19)
  • (removed) libc/src/math/nvptx/exp10.cpp (-19)
  • (removed) libc/src/math/nvptx/exp10f.cpp (-19)
  • (removed) libc/src/math/nvptx/exp2.cpp (-19)
  • (removed) libc/src/math/nvptx/exp2f.cpp (-19)
  • (removed) libc/src/math/nvptx/expf.cpp (-19)
  • (removed) libc/src/math/nvptx/expm1.cpp (-19)
  • (removed) libc/src/math/nvptx/expm1f.cpp (-19)
  • (removed) libc/src/math/nvptx/fdim.cpp (-21)
  • (removed) libc/src/math/nvptx/fdimf.cpp (-21)
  • (removed) libc/src/math/nvptx/frexp.cpp (-21)
  • (removed) libc/src/math/nvptx/frexpf.cpp (-21)
  • (removed) libc/src/math/nvptx/hypot.cpp (-21)
  • (removed) libc/src/math/nvptx/hypotf.cpp (-21)
  • (removed) libc/src/math/nvptx/ilogb.cpp (-19)
  • (removed) libc/src/math/nvptx/ilogbf.cpp (-19)
  • (removed) libc/src/math/nvptx/ldexp.cpp (-21)
  • (removed) libc/src/math/nvptx/ldexpf.cpp (-21)
  • (modified) libc/src/math/nvptx/lgamma.cpp (+1-2)
  • (modified) libc/src/math/nvptx/lgamma_r.cpp (+3-5)
  • (modified) libc/src/math/nvptx/llrint.cpp (-1)
  • (modified) libc/src/math/nvptx/llrintf.cpp (-1)
  • (removed) libc/src/math/nvptx/log.cpp (-19)
  • (removed) libc/src/math/nvptx/log10.cpp (-19)
  • (removed) libc/src/math/nvptx/log10f.cpp (-19)
  • (removed) libc/src/math/nvptx/log1p.cpp (-19)
  • (removed) libc/src/math/nvptx/log1pf.cpp (-19)
  • (removed) libc/src/math/nvptx/log2.cpp (-19)
  • (removed) libc/src/math/nvptx/log2f.cpp (-19)
  • (removed) libc/src/math/nvptx/logb.cpp (-19)
  • (removed) libc/src/math/nvptx/logbf.cpp (-19)
  • (removed) libc/src/math/nvptx/logf.cpp (-19)
  • (modified) libc/src/math/nvptx/lrint.cpp (-1)
  • (removed) libc/src/math/nvptx/lrintf.cpp (-19)
  • (removed) libc/src/math/nvptx/nextafter.cpp (-21)
  • (removed) libc/src/math/nvptx/nextafterf.cpp (-21)
  • (removed) libc/src/math/nvptx/nvptx.h (-103)
  • (removed) libc/src/math/nvptx/powf.cpp (-19)
  • (removed) libc/src/math/nvptx/powi.cpp (-19)
  • (removed) libc/src/math/nvptx/powif.cpp (-19)
  • (removed) libc/src/math/nvptx/remquo.cpp (-21)
  • (removed) libc/src/math/nvptx/remquof.cpp (-21)
  • (removed) libc/src/math/nvptx/scalbn.cpp (-21)
  • (removed) libc/src/math/nvptx/scalbnf.cpp (-21)
  • (removed) libc/src/math/nvptx/sin.cpp (-19)
  • (removed) libc/src/math/nvptx/sincos.cpp (-21)
  • (removed) libc/src/math/nvptx/sincosf.cpp (-21)
  • (removed) libc/src/math/nvptx/sinf.cpp (-19)
  • (removed) libc/src/math/nvptx/sinh.cpp (-19)
  • (removed) libc/src/math/nvptx/sinhf.cpp (-19)
  • (removed) libc/src/math/nvptx/tan.cpp (-19)
  • (removed) libc/src/math/nvptx/tanf.cpp (-19)
  • (removed) libc/src/math/nvptx/tanh.cpp (-19)
  • (removed) libc/src/math/nvptx/tanhf.cpp (-19)
  • (modified) libc/src/math/nvptx/tgamma.cpp (+1-2)
  • (modified) libc/src/math/nvptx/tgammaf.cpp (+1-2)
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
-//
-//===----------------------------------------------------------------------===//
-
-#inclu...
[truncated]

@llvmbot
Copy link
Member

llvmbot commented Jun 6, 2025

@llvm/pr-subscribers-backend-amdgpu

Author: Joseph Huber (jhuber6)

Changes

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


Patch is 147.41 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/143173.diff

161 Files Affected:

  • (modified) libc/cmake/modules/LLVMLibCLibraryRules.cmake (+3-6)
  • (modified) libc/cmake/modules/LLVMLibCObjectRules.cmake (+3-11)
  • (modified) libc/cmake/modules/LLVMLibCTestRules.cmake (-4)
  • (modified) libc/config/gpu/amdgpu/entrypoints.txt (-10)
  • (modified) libc/config/gpu/nvptx/entrypoints.txt (-10)
  • (modified) libc/src/math/amdgpu/CMakeLists.txt (-150)
  • (removed) libc/src/math/amdgpu/acos.cpp (-19)
  • (removed) libc/src/math/amdgpu/acosf.cpp (-19)
  • (removed) libc/src/math/amdgpu/acosh.cpp (-19)
  • (removed) libc/src/math/amdgpu/acoshf.cpp (-19)
  • (removed) libc/src/math/amdgpu/asin.cpp (-19)
  • (removed) libc/src/math/amdgpu/asinf.cpp (-19)
  • (removed) libc/src/math/amdgpu/asinh.cpp (-19)
  • (removed) libc/src/math/amdgpu/asinhf.cpp (-19)
  • (removed) libc/src/math/amdgpu/atan.cpp (-19)
  • (removed) libc/src/math/amdgpu/atan2.cpp (-21)
  • (removed) libc/src/math/amdgpu/atan2f.cpp (-21)
  • (removed) libc/src/math/amdgpu/atanf.cpp (-19)
  • (removed) libc/src/math/amdgpu/atanh.cpp (-19)
  • (removed) libc/src/math/amdgpu/atanhf.cpp (-19)
  • (removed) libc/src/math/amdgpu/cos.cpp (-19)
  • (removed) libc/src/math/amdgpu/cosf.cpp (-19)
  • (removed) libc/src/math/amdgpu/cosh.cpp (-19)
  • (removed) libc/src/math/amdgpu/coshf.cpp (-19)
  • (removed) libc/src/math/amdgpu/declarations.h (-91)
  • (removed) libc/src/math/amdgpu/erf.cpp (-19)
  • (removed) libc/src/math/amdgpu/erff.cpp (-19)
  • (removed) libc/src/math/amdgpu/exp.cpp (-19)
  • (removed) libc/src/math/amdgpu/exp10.cpp (-19)
  • (removed) libc/src/math/amdgpu/exp10f.cpp (-19)
  • (removed) libc/src/math/amdgpu/exp2.cpp (-19)
  • (removed) libc/src/math/amdgpu/exp2f.cpp (-19)
  • (removed) libc/src/math/amdgpu/expf.cpp (-19)
  • (removed) libc/src/math/amdgpu/expm1.cpp (-19)
  • (removed) libc/src/math/amdgpu/expm1f.cpp (-19)
  • (removed) libc/src/math/amdgpu/fdim.cpp (-21)
  • (removed) libc/src/math/amdgpu/fdimf.cpp (-21)
  • (modified) libc/src/math/amdgpu/frexp.cpp (-1)
  • (modified) libc/src/math/amdgpu/frexpf.cpp (-1)
  • (removed) libc/src/math/amdgpu/hypot.cpp (-21)
  • (removed) libc/src/math/amdgpu/hypotf.cpp (-21)
  • (removed) libc/src/math/amdgpu/ilogb.cpp (-19)
  • (removed) libc/src/math/amdgpu/ilogbf.cpp (-19)
  • (modified) libc/src/math/amdgpu/ldexp.cpp (-1)
  • (modified) libc/src/math/amdgpu/ldexpf.cpp (-1)
  • (modified) libc/src/math/amdgpu/lgamma.cpp (+2-2)
  • (modified) libc/src/math/amdgpu/lgamma_r.cpp (+3-6)
  • (modified) libc/src/math/amdgpu/llrint.cpp (-1)
  • (modified) libc/src/math/amdgpu/llrintf.cpp (-1)
  • (removed) libc/src/math/amdgpu/log.cpp (-19)
  • (removed) libc/src/math/amdgpu/log10.cpp (-19)
  • (removed) libc/src/math/amdgpu/log10f.cpp (-19)
  • (removed) libc/src/math/amdgpu/log1p.cpp (-19)
  • (removed) libc/src/math/amdgpu/log1pf.cpp (-19)
  • (removed) libc/src/math/amdgpu/log2.cpp (-19)
  • (removed) libc/src/math/amdgpu/log2f.cpp (-19)
  • (removed) libc/src/math/amdgpu/logb.cpp (-19)
  • (removed) libc/src/math/amdgpu/logbf.cpp (-19)
  • (removed) libc/src/math/amdgpu/logf.cpp (-19)
  • (modified) libc/src/math/amdgpu/lrint.cpp (-1)
  • (modified) libc/src/math/amdgpu/lrintf.cpp (-1)
  • (removed) libc/src/math/amdgpu/nextafter.cpp (-21)
  • (removed) libc/src/math/amdgpu/nextafterf.cpp (-21)
  • (removed) libc/src/math/amdgpu/platform.h (-55)
  • (removed) libc/src/math/amdgpu/powf.cpp (-21)
  • (removed) libc/src/math/amdgpu/powi.cpp (-21)
  • (removed) libc/src/math/amdgpu/powif.cpp (-21)
  • (removed) libc/src/math/amdgpu/remquo.cpp (-24)
  • (removed) libc/src/math/amdgpu/remquof.cpp (-24)
  • (modified) libc/src/math/amdgpu/scalbn.cpp (-1)
  • (modified) libc/src/math/amdgpu/scalbnf.cpp (-1)
  • (removed) libc/src/math/amdgpu/sin.cpp (-19)
  • (removed) libc/src/math/amdgpu/sincos.cpp (-21)
  • (removed) libc/src/math/amdgpu/sincosf.cpp (-21)
  • (removed) libc/src/math/amdgpu/sinf.cpp (-19)
  • (removed) libc/src/math/amdgpu/sinh.cpp (-19)
  • (removed) libc/src/math/amdgpu/sinhf.cpp (-19)
  • (removed) libc/src/math/amdgpu/tan.cpp (-19)
  • (removed) libc/src/math/amdgpu/tanf.cpp (-19)
  • (removed) libc/src/math/amdgpu/tanh.cpp (-19)
  • (removed) libc/src/math/amdgpu/tanhf.cpp (-19)
  • (modified) libc/src/math/amdgpu/tgamma.cpp (+1-2)
  • (modified) libc/src/math/amdgpu/tgammaf.cpp (+1-2)
  • (modified) libc/src/math/nvptx/CMakeLists.txt (-162)
  • (removed) libc/src/math/nvptx/acos.cpp (-19)
  • (removed) libc/src/math/nvptx/acosf.cpp (-19)
  • (removed) libc/src/math/nvptx/acosh.cpp (-19)
  • (removed) libc/src/math/nvptx/acoshf.cpp (-19)
  • (removed) libc/src/math/nvptx/asin.cpp (-19)
  • (removed) libc/src/math/nvptx/asinf.cpp (-19)
  • (removed) libc/src/math/nvptx/asinh.cpp (-19)
  • (removed) libc/src/math/nvptx/asinhf.cpp (-19)
  • (removed) libc/src/math/nvptx/atan.cpp (-19)
  • (removed) libc/src/math/nvptx/atan2.cpp (-21)
  • (removed) libc/src/math/nvptx/atan2f.cpp (-21)
  • (removed) libc/src/math/nvptx/atanf.cpp (-19)
  • (removed) libc/src/math/nvptx/atanh.cpp (-19)
  • (removed) libc/src/math/nvptx/atanhf.cpp (-19)
  • (removed) libc/src/math/nvptx/cos.cpp (-19)
  • (removed) libc/src/math/nvptx/cosf.cpp (-19)
  • (removed) libc/src/math/nvptx/cosh.cpp (-19)
  • (removed) libc/src/math/nvptx/coshf.cpp (-19)
  • (removed) libc/src/math/nvptx/declarations.h (-94)
  • (removed) libc/src/math/nvptx/erf.cpp (-19)
  • (removed) libc/src/math/nvptx/erff.cpp (-19)
  • (removed) libc/src/math/nvptx/exp.cpp (-19)
  • (removed) libc/src/math/nvptx/exp10.cpp (-19)
  • (removed) libc/src/math/nvptx/exp10f.cpp (-19)
  • (removed) libc/src/math/nvptx/exp2.cpp (-19)
  • (removed) libc/src/math/nvptx/exp2f.cpp (-19)
  • (removed) libc/src/math/nvptx/expf.cpp (-19)
  • (removed) libc/src/math/nvptx/expm1.cpp (-19)
  • (removed) libc/src/math/nvptx/expm1f.cpp (-19)
  • (removed) libc/src/math/nvptx/fdim.cpp (-21)
  • (removed) libc/src/math/nvptx/fdimf.cpp (-21)
  • (removed) libc/src/math/nvptx/frexp.cpp (-21)
  • (removed) libc/src/math/nvptx/frexpf.cpp (-21)
  • (removed) libc/src/math/nvptx/hypot.cpp (-21)
  • (removed) libc/src/math/nvptx/hypotf.cpp (-21)
  • (removed) libc/src/math/nvptx/ilogb.cpp (-19)
  • (removed) libc/src/math/nvptx/ilogbf.cpp (-19)
  • (removed) libc/src/math/nvptx/ldexp.cpp (-21)
  • (removed) libc/src/math/nvptx/ldexpf.cpp (-21)
  • (modified) libc/src/math/nvptx/lgamma.cpp (+1-2)
  • (modified) libc/src/math/nvptx/lgamma_r.cpp (+3-5)
  • (modified) libc/src/math/nvptx/llrint.cpp (-1)
  • (modified) libc/src/math/nvptx/llrintf.cpp (-1)
  • (removed) libc/src/math/nvptx/log.cpp (-19)
  • (removed) libc/src/math/nvptx/log10.cpp (-19)
  • (removed) libc/src/math/nvptx/log10f.cpp (-19)
  • (removed) libc/src/math/nvptx/log1p.cpp (-19)
  • (removed) libc/src/math/nvptx/log1pf.cpp (-19)
  • (removed) libc/src/math/nvptx/log2.cpp (-19)
  • (removed) libc/src/math/nvptx/log2f.cpp (-19)
  • (removed) libc/src/math/nvptx/logb.cpp (-19)
  • (removed) libc/src/math/nvptx/logbf.cpp (-19)
  • (removed) libc/src/math/nvptx/logf.cpp (-19)
  • (modified) libc/src/math/nvptx/lrint.cpp (-1)
  • (removed) libc/src/math/nvptx/lrintf.cpp (-19)
  • (removed) libc/src/math/nvptx/nextafter.cpp (-21)
  • (removed) libc/src/math/nvptx/nextafterf.cpp (-21)
  • (removed) libc/src/math/nvptx/nvptx.h (-103)
  • (removed) libc/src/math/nvptx/powf.cpp (-19)
  • (removed) libc/src/math/nvptx/powi.cpp (-19)
  • (removed) libc/src/math/nvptx/powif.cpp (-19)
  • (removed) libc/src/math/nvptx/remquo.cpp (-21)
  • (removed) libc/src/math/nvptx/remquof.cpp (-21)
  • (removed) libc/src/math/nvptx/scalbn.cpp (-21)
  • (removed) libc/src/math/nvptx/scalbnf.cpp (-21)
  • (removed) libc/src/math/nvptx/sin.cpp (-19)
  • (removed) libc/src/math/nvptx/sincos.cpp (-21)
  • (removed) libc/src/math/nvptx/sincosf.cpp (-21)
  • (removed) libc/src/math/nvptx/sinf.cpp (-19)
  • (removed) libc/src/math/nvptx/sinh.cpp (-19)
  • (removed) libc/src/math/nvptx/sinhf.cpp (-19)
  • (removed) libc/src/math/nvptx/tan.cpp (-19)
  • (removed) libc/src/math/nvptx/tanf.cpp (-19)
  • (removed) libc/src/math/nvptx/tanh.cpp (-19)
  • (removed) libc/src/math/nvptx/tanhf.cpp (-19)
  • (modified) libc/src/math/nvptx/tgamma.cpp (+1-2)
  • (modified) libc/src/math/nvptx/tgammaf.cpp (+1-2)
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
-//
-//===----------------------------------------------------------------------===//
-
-#inclu...
[truncated]

Copy link
Collaborator

@JonChesterfield JonChesterfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nice, forgot about this. If we take another shot at spirv this will also make that patch much cleaner.

@jhuber6 jhuber6 merged commit 525726a into llvm:main Jun 6, 2025
16 checks passed
tomtor pushed a commit to tomtor/llvm-project that referenced this pull request Jun 14, 2025
Summary:
This patch cleans up the leftoever files that were either implemented or
are still unimplemented stubs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants