[clang] 31ee667 - [Clang] Fix gpuintrin_lang test for OpenCL
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 15 08:48:43 PST 2024
Author: Joseph Huber
Date: 2024-11-15T10:48:05-06:00
New Revision: 31ee667eb02c68ad186cb129f9dcb72a9d2222bc
URL: https://github.com/llvm/llvm-project/commit/31ee667eb02c68ad186cb129f9dcb72a9d2222bc
DIFF: https://github.com/llvm/llvm-project/commit/31ee667eb02c68ad186cb129f9dcb72a9d2222bc.diff
LOG: [Clang] Fix gpuintrin_lang test for OpenCL
Added:
Modified:
clang/lib/Headers/amdgpuintrin.h
Removed:
################################################################################
diff --git a/clang/lib/Headers/amdgpuintrin.h b/clang/lib/Headers/amdgpuintrin.h
index 5e89eb92c0b58b..720674a85f52cf 100644
--- a/clang/lib/Headers/amdgpuintrin.h
+++ b/clang/lib/Headers/amdgpuintrin.h
@@ -160,14 +160,14 @@ __gpu_shuffle_idx_u64(uint64_t __lane_mask, uint32_t __idx, uint64_t __x) {
// Returns true if the flat pointer points to CUDA 'shared' memory.
_DEFAULT_FN_ATTRS static __inline__ bool __gpu_is_ptr_local(void *ptr) {
- return __builtin_amdgcn_is_shared(
- (void __attribute__((address_space(0))) *)((void __gpu_generic *)ptr));
+ return __builtin_amdgcn_is_shared((void __attribute__((address_space(0))) *)((
+ void [[clang::opencl_generic]] *)ptr));
}
// Returns true if the flat pointer points to CUDA 'local' memory.
_DEFAULT_FN_ATTRS static __inline__ bool __gpu_is_ptr_private(void *ptr) {
- return __builtin_amdgcn_is_private(
- (void __attribute__((address_space(0))) *)((void __gpu_generic *)ptr));
+ return __builtin_amdgcn_is_private((void __attribute__((
+ address_space(0))) *)((void [[clang::opencl_generic]] *)ptr));
}
// Terminates execution of the associated wavefront.
More information about the cfe-commits
mailing list