Skip to content

Commit 31ee667

Browse files
committed
[Clang] Fix gpuintrin_lang test for OpenCL
1 parent 0b344b4 commit 31ee667

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/lib/Headers/amdgpuintrin.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,14 @@ __gpu_shuffle_idx_u64(uint64_t __lane_mask, uint32_t __idx, uint64_t __x) {
160160

161161
// Returns true if the flat pointer points to CUDA 'shared' memory.
162162
_DEFAULT_FN_ATTRS static __inline__ bool __gpu_is_ptr_local(void *ptr) {
163-
return __builtin_amdgcn_is_shared(
164-
(void __attribute__((address_space(0))) *)((void __gpu_generic *)ptr));
163+
return __builtin_amdgcn_is_shared((void __attribute__((address_space(0))) *)((
164+
void [[clang::opencl_generic]] *)ptr));
165165
}
166166

167167
// Returns true if the flat pointer points to CUDA 'local' memory.
168168
_DEFAULT_FN_ATTRS static __inline__ bool __gpu_is_ptr_private(void *ptr) {
169-
return __builtin_amdgcn_is_private(
170-
(void __attribute__((address_space(0))) *)((void __gpu_generic *)ptr));
169+
return __builtin_amdgcn_is_private((void __attribute__((
170+
address_space(0))) *)((void [[clang::opencl_generic]] *)ptr));
171171
}
172172

173173
// Terminates execution of the associated wavefront.

0 commit comments

Comments
 (0)