summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorAnastasia Stulova <anastasia.stulova@arm.com>2019-03-19 17:09:06 +0000
committerAnastasia Stulova <anastasia.stulova@arm.com>2019-03-19 17:09:06 +0000
commitcb16edeb4579daf2a409ab3145342aebe2bad70f (patch)
tree8ae4cff663f8b53e00be292201f955f7d39b3898 /clang
parentdb4601e60a0fb3e079f20f68706de4d6010a1f56 (diff)
downloadbcm5719-llvm-cb16edeb4579daf2a409ab3145342aebe2bad70f.tar.gz
bcm5719-llvm-cb16edeb4579daf2a409ab3145342aebe2bad70f.zip
[OpenCL] Minor improvements in default header testing
Differential Revision: https://reviews.llvm.org/D59544 llvm-svn: 356479
Diffstat (limited to 'clang')
-rw-r--r--clang/test/Headers/opencl-c-header.cl11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/test/Headers/opencl-c-header.cl b/clang/test/Headers/opencl-c-header.cl
index 234508b9fff..14c2e784448 100644
--- a/clang/test/Headers/opencl-c-header.cl
+++ b/clang/test/Headers/opencl-c-header.cl
@@ -53,15 +53,14 @@
// CHECK: _Z16convert_char_rtec
// CHECK-NOT: _Z3ctzc
// CHECK20: _Z3ctzc
-// CHECK20-NOT: _Z16convert_char_rtec
+// CHECK20: _Z16convert_char_rtec
char f(char x) {
-#if !defined(__OPENCL_CPP_VERSION__) && (__OPENCL_C_VERSION__ != CL_VERSION_2_0)
- return convert_char_rte(x);
-
-#else //__OPENCL_C_VERSION__
+// Check functionality from OpenCL 2.0 onwards
+#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ == CL_VERSION_2_0)
ndrange_t t;
- return ctz(x);
+ x = ctz(x);
#endif //__OPENCL_C_VERSION__
+ return convert_char_rte(x);
}
// Verify that a builtin using a write_only image3d_t type is available
OpenPOWER on IntegriCloud