Author: bader Date: Fri Jan 26 03:48:46 2018 New Revision: 323522 URL: http://llvm.org/viewvc/llvm-project?rev=323522&view=rev Log: [OpenCL] Add "cles_khr_int64" extension.
Summary: For OpenCL 1.1 embedded profile 64 bit integers i.e. long, ulong including the appropriate vector data types and operations on 64-bit integers are optional. The "cles_khr_int64" extension string will be reported if the embedded profile implementation supports 64-bit integers. Reviewers: Anastasia, bader Reviewed By: Anastasia, bader Subscribers: bader, yaxunl, Anastasia, cfe-commits Differential Revision: https://reviews.llvm.org/D42532 Modified: cfe/trunk/include/clang/Basic/OpenCLExtensions.def cfe/trunk/test/SemaOpenCL/extension-version.cl Modified: cfe/trunk/include/clang/Basic/OpenCLExtensions.def URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/OpenCLExtensions.def?rev=323522&r1=323521&r2=323522&view=diff ============================================================================== --- cfe/trunk/include/clang/Basic/OpenCLExtensions.def (original) +++ cfe/trunk/include/clang/Basic/OpenCLExtensions.def Fri Jan 26 03:48:46 2018 @@ -53,6 +53,9 @@ OPENCLEXT_INTERNAL(cl_khr_icd, 100, ~0U) OPENCLEXT_INTERNAL(cl_khr_gl_event, 110, ~0U) OPENCLEXT_INTERNAL(cl_khr_d3d10_sharing, 110, ~0U) +// EMBEDDED_PROFILE +OPENCLEXT_INTERNAL(cles_khr_int64, 110, ~0U) + // OpenCL 1.2. OPENCLEXT_INTERNAL(cl_khr_context_abort, 120, ~0U) OPENCLEXT_INTERNAL(cl_khr_d3d11_sharing, 120, ~0U) Modified: cfe/trunk/test/SemaOpenCL/extension-version.cl URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaOpenCL/extension-version.cl?rev=323522&r1=323521&r2=323522&view=diff ============================================================================== --- cfe/trunk/test/SemaOpenCL/extension-version.cl (original) +++ cfe/trunk/test/SemaOpenCL/extension-version.cl Fri Jan 26 03:48:46 2018 @@ -131,6 +131,15 @@ #endif #pragma OPENCL EXTENSION cl_khr_d3d10_sharing: enable +#if (__OPENCL_C_VERSION__ >= 110) +#ifndef cles_khr_int64 +#error "Missing cles_khr_int64 define" +#endif +#else +// expected-warning@+2{{unsupported OpenCL extension 'cles_khr_int64' - ignoring}} +#endif +#pragma OPENCL EXTENSION cles_khr_int64: enable + #if (__OPENCL_C_VERSION__ >= 120) #ifndef cl_khr_context_abort #error "Missing cl_context_abort define" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits