[libc-commits] [libc] c012eb7 - [libc] Enable aliasing on AMDGPU targets

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Fri Jul 7 09:49:23 PDT 2023


Author: Joseph Huber
Date: 2023-07-07T11:49:16-05:00
New Revision: c012eb79e2337dd901d529d40dba157476a14aa4

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

LOG: [libc] Enable aliasing on AMDGPU targets

AMDGPU supports aliases now, so we can drop this case and leave it only
for the NVPTX target. Unfortunately it's unlikely that NVPTX will be
able to support this in the future due to their PTX language being very
limited.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D154704

Added: 
    

Modified: 
    libc/src/__support/common.h

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/common.h b/libc/src/__support/common.h
index 300d2bc8b2a4f3..5f2b63de2743bb 100644
--- a/libc/src/__support/common.h
+++ b/libc/src/__support/common.h
@@ -16,8 +16,8 @@
 #define LLVM_LIBC_FUNCTION_ATTR
 #endif
 
-// GPU targets do not support aliasing.
-#if defined(LIBC_COPT_PUBLIC_PACKAGING) && defined(LIBC_TARGET_ARCH_IS_GPU)
+// The NVPTX target does not support aliasing.
+#if defined(LIBC_COPT_PUBLIC_PACKAGING) && defined(LIBC_TARGET_ARCH_IS_NVPTX)
 #define LLVM_LIBC_FUNCTION_IMPL(type, name, arglist)                           \
   LLVM_LIBC_FUNCTION_ATTR decltype(__llvm_libc::name)                          \
       __##name##_impl__ __asm__(#name);                                        \


        


More information about the libc-commits mailing list