File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,9 @@ class LLVM_LIBRARY_VISIBILITY AMDGPUTargetInfo final : public TargetInfo {
318318 Opts[" __opencl_c_images" ] = true ;
319319 Opts[" __opencl_c_3d_image_writes" ] = true ;
320320 Opts[" cl_khr_3d_image_writes" ] = true ;
321+
322+ Opts[" __opencl_c_generic_address_space" ] =
323+ GPUKind >= llvm::AMDGPU::GK_GFX700;
321324 }
322325 }
323326
Original file line number Diff line number Diff line change 155155#endif
156156#pragma OPENCL EXTENSION cl_amd_media_ops2: enable
157157
158+ #if (__OPENCL_C_VERSION__ >= 300 )
159+ #ifndef __opencl_c_generic_address_space
160+ #error "Missing __opencl_c_generic_address_space define"
161+ #else
162+ #error "Incorrect __opencl_c_generic_address_space define"
163+ #endif
164+ #pragma OPENCL EXTENSION __opencl_c_generic_address_space: enable
165+ #endif
Original file line number Diff line number Diff line change 146146#pragma OPENCL EXTENSION cl_khr_subgroups: enable
147147// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_subgroups' - ignoring}}
148148
149+ #ifdef __opencl_c_generic_address_space
150+ #error "Incorrect __opencl_c_generic_address_space define"
151+ #endif
152+ #pragma OPENCL EXTENSION __opencl_c_generic_address_space: enable
153+ // expected-warning@-1{{OpenCL extension '__opencl_c_generic_address_space' unknown or does not require pragma - ignoring}}
You can’t perform that action at this time.
0 commit comments