From e41da8a0d3f410693bd7e5ae6f7c32c8369194c1 Mon Sep 17 00:00:00 2001 From: Anastasia Stulova Date: Tue, 19 Mar 2019 17:09:06 +0000 Subject: [PATCH] [OpenCL] Minor improvements in default header testing Differential Revision: https://reviews.llvm.org/D59544 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356479 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Headers/opencl-c-header.cl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/Headers/opencl-c-header.cl b/test/Headers/opencl-c-header.cl index 234508b9ff..14c2e78444 100644 --- a/test/Headers/opencl-c-header.cl +++ b/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 -- 2.40.0