llvm-project/clang/test/SemaOpenCL
Fraser Cormack cc6e894587 Fix OpenCL 1.2 double as an optional core feature behaviour
In OpenCL 1.2, using double no longer requires using the pragma cl_khr_fp64,
instead a kernel is allowed to use double, but must first have queried
clGetDeviceInfo's CL_DEVICE_DOUBLE_FP_CONFIG.

Page 197, section 6.1.1 of the OpenCL 1.2 specification has a footnote 23
describing this behaviour.

I've also added test cases such that the pragma must be used if targeting
OpenCL 1.0 or 1.1, but is ignored in 1.2 and 2.0.

Patch by Neil Henning!

Reviewers: Pekka Jääskeläinen

Differential Revision: http://reviews.llvm.org/D7245

llvm-svn: 227565
2015-01-30 10:51:46 +00:00
..
address-spaces-conversions-cl2.0.cl [OpenCL] Implemented restrictions for pointer conversions specified in OpenCL v2.0. 2014-11-26 15:36:41 +00:00
address-spaces.cl OpenCL: Emit global variables in the constant addr space as constant globals 2014-10-16 15:29:19 +00:00
amdgpu-num-register-attrs.cl Workaround attribute ordering issue with kernel only attributes 2014-12-05 18:03:58 +00:00
array-parameters.cl Allow address space qualifiers on OpenCL array parameters 2014-04-15 11:38:29 +00:00
cond.cl
endian-attr.cl Removing the endian attribute and updating associated test cases. This functionality was never completely implemented, and this is an improvement over silently eating the attribute. 2013-09-09 12:57:20 +00:00
event_t.cl [OpenCL] Variables in the constant address space must be initialized. 2014-01-03 14:16:55 +00:00
event_t_overload.cl Enable overloading of OpenCL events - this is needed for the overloaded OpenCL builtin functions. 2013-02-07 16:05:33 +00:00
extension-fp64-cl1.1.cl Fix OpenCL 1.2 double as an optional core feature behaviour 2015-01-30 10:51:46 +00:00
extension-fp64.cl
extern.cl OpenCL: Emit global variables in the constant addr space as constant globals 2014-10-16 15:29:19 +00:00
func_ptr.cl OpenCL: fix for the restriction on pointers to functions. 2014-02-20 13:52:08 +00:00
half.cl Parameter/argument terminology fixes 2014-05-11 16:06:11 +00:00
init.cl
invalid-constant.cl [OpenCL] Add test case for previous commit. 2014-01-03 15:11:57 +00:00
invalid-kernel-attrs.cl [OpenCL] Reject reqd_work_group_size(X, Y, Z) where X, Y or Z == 0. 2014-05-19 14:41:38 +00:00
invalid-kernel-parameters.cl Error on more illegal kernel argument types for OpenCL 2013-07-23 01:23:36 +00:00
invalid-kernel.cl Allow address space qualifiers on OpenCL array parameters 2014-04-15 11:38:29 +00:00
invalid-logical-ops-1.1.cl Add a 64-bit triple to these tests, to fix 32-bit bots. 2013-02-21 13:42:33 +00:00
invalid-logical-ops-1.2.cl Add a 64-bit triple to these tests, to fix 32-bit bots. 2013-02-21 13:42:33 +00:00
lit.local.cfg Disallow driver use in more Sema tests 2014-04-19 19:07:31 +00:00
optional-core-fp64-cl1.2.cl Fix OpenCL 1.2 double as an optional core feature behaviour 2015-01-30 10:51:46 +00:00
optional-core-fp64-cl2.0.cl Fix OpenCL 1.2 double as an optional core feature behaviour 2015-01-30 10:51:46 +00:00
sampler_t.cl Add OpenCL samplers as Clang builtin types and check sampler related restrictions. 2013-02-07 10:55:47 +00:00
sampler_t_overload.cl Add OpenCL samplers as Clang builtin types and check sampler related restrictions. 2013-02-07 10:55:47 +00:00
shifts.cl Fix a crash in OpenCL code by using the proper (RHS) bit-width. 2013-01-29 15:09:40 +00:00
sizeof.cl [OpenCL] Produce an error, instead of a warning, for sizeof(void) in OpenCL. 2013-12-31 15:47:49 +00:00
storageclass.cl Add an error to check that all program scope variables are in the constant address space in OpenCL. 2013-04-05 20:14:50 +00:00
str_literals.cl [OpenCL] Make sure we put string literals in the constant address space. 2013-11-14 18:26:10 +00:00
unsupported.cl
vec_compare.cl
vec_step.cl
vector_conv_invalid.cl Print detailed vector type information on diagnostics. 2014-04-25 20:41:38 +00:00
vector_inc_dec_ops.cl OpenCL allows the (pre/post)-(increment/decrement) operator on integer vector types, 2013-09-06 09:58:08 +00:00
vector_literals_const.cl
vector_literals_invalid.cl
warn-missing-prototypes.cl