File tree 3 files changed +16
-0
lines changed 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 {
318
318
Opts[" __opencl_c_images" ] = true ;
319
319
Opts[" __opencl_c_3d_image_writes" ] = true ;
320
320
Opts[" cl_khr_3d_image_writes" ] = true ;
321
+
322
+ Opts[" __opencl_c_generic_address_space" ] =
323
+ GPUKind >= llvm::AMDGPU::GK_GFX700;
321
324
}
322
325
}
323
326
Original file line number Diff line number Diff line change 155
155
#endif
156
156
#pragma OPENCL EXTENSION cl_amd_media_ops2: enable
157
157
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 146
146
#pragma OPENCL EXTENSION cl_khr_subgroups: enable
147
147
// expected-warning@-1{{unsupported OpenCL extension 'cl_khr_subgroups' - ignoring}}
148
148
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