summaryrefslogtreecommitdiff
path: root/test/SemaOpenCL
diff options
context:
space:
mode:
authorAlexey Sotkin <alexey.sotkin@intel.com>2017-11-27 09:14:17 +0000
committerAlexey Sotkin <alexey.sotkin@intel.com>2017-11-27 09:14:17 +0000
commit950990b2a290f309cf4ef6d196095e75c928aff4 (patch)
tree0020c4d288002e012458dcb6420b6ea2df76c444 /test/SemaOpenCL
parent9f9177d3ef72580ca29e8844327f63d7aa1908af (diff)
[OpenCL] Add extensions cl_intel_subgroups and cl_intel_subgroups_short
Reviewers: yaxunl, Anastasia, bader Reviewed By: Anastasia, bader Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39936 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaOpenCL')
-rw-r--r--test/SemaOpenCL/extension-version.cl18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaOpenCL/extension-version.cl b/test/SemaOpenCL/extension-version.cl
index 6100346f70..e560276046 100644
--- a/test/SemaOpenCL/extension-version.cl
+++ b/test/SemaOpenCL/extension-version.cl
@@ -273,3 +273,21 @@
#endif
#pragma OPENCL EXTENSION cl_amd_media_ops2: enable
+#if (__OPENCL_C_VERSION__ >= 120)
+#ifndef cl_intel_subgroups
+#error "Missing cl_intel_subgroups define"
+#endif
+#else
+// expected-warning@+2{{unsupported OpenCL extension 'cl_intel_subgroups' - ignoring}}
+#endif
+#pragma OPENCL EXTENSION cl_intel_subgroups : enable
+
+#if (__OPENCL_C_VERSION__ >= 120)
+#ifndef cl_intel_subgroups_short
+#error "Missing cl_intel_subgroups_short define"
+#endif
+#else
+// expected-warning@+2{{unsupported OpenCL extension 'cl_intel_subgroups_short' - ignoring}}
+#endif
+#pragma OPENCL EXTENSION cl_intel_subgroups_short : enable
+