llvm-project/clang/test/SemaOpenCL
Yaxun Liu 39195062c2 Add OpenCL 2.0 atomic builtin functions as Clang builtin
OpenCL 2.0 atomic builtin functions have a scope argument which is ideally
represented as synchronization scope argument in LLVM atomic instructions.

Clang supports translating Clang atomic builtin functions to LLVM atomic
instructions. However it currently does not support synchronization scope
of LLVM atomic instructions. Without this, users have to use LLVM assembly
code to implement OpenCL atomic builtin functions.

This patch adds OpenCL 2.0 atomic builtin functions as Clang builtin
functions, which supports generating LLVM atomic instructions with
synchronization scope operand.

Currently only constant memory scope argument is supported. Support of
non-constant memory scope argument will be added later.

Differential Revision: https://reviews.llvm.org/D28691

llvm-svn: 310082
2017-08-04 18:16:31 +00:00
..
access-qualifier.cl [OpenCL] Diagnose write_only image3d when extension is disabled 2017-01-25 12:18:50 +00:00
address-spaces-conversions-cl2.0.cl [OpenCL] Fix type compatibility check and generic AS mangling. 2017-03-10 15:23:07 +00:00
address-spaces.cl
amdgpu-attrs.cl [AMDGPU] Expose flat work group size, register and wave control attributes 2016-09-26 01:02:57 +00:00
arithmetic-conversions.cl [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element 2017-05-30 05:32:03 +00:00
array-init.cl [OpenCL] Handle OpenCL specific subelement types 2017-05-10 10:28:34 +00:00
array-parameters.cl
as_type.cl [OpenCL] Implement as_type operator as alias of __builtin_astype. 2017-03-16 12:15:10 +00:00
atomic-init.cl [OpenCL] Extended diagnostics for atomic initialization 2017-04-05 12:47:10 +00:00
atomic-ops.cl Add OpenCL 2.0 atomic builtin functions as Clang builtin 2017-08-04 18:16:31 +00:00
bool-vectors.cl [Sema] Make extended vectors of `bool` an error. 2016-01-28 01:38:18 +00:00
builtin.cl [OpenCL] Diagnose variadic arguments 2016-10-28 12:59:39 +00:00
builtins-amdgcn-error-f16.cl AMDGPU: Add fmed3 half builtin 2017-02-22 20:55:59 +00:00
builtins-amdgcn-error-gfx9.cl AMDGPU: Add fmed3 half builtin 2017-02-22 20:55:59 +00:00
builtins-amdgcn-error.cl [AMDGPU] Add builtin functions readlane ds_permute mov_dpp 2017-03-10 01:30:46 +00:00
cl20-device-side-enqueue.cl [OpenCL] Add missing subgroup builtins 2017-08-01 13:27:09 +00:00
clang-builtin-version.cl [OpenCL] Added diagnostic for implicit declaration of function in OpenCL 2017-05-30 05:57:52 +00:00
cond.cl [OpenCL] An error shall occur if any scalar operand has greater rank than the type of the vector element 2017-05-30 05:32:03 +00:00
convergent.cl [OpenCL] Mark group functions as convergent in opencl-c.h 2016-11-01 18:45:32 +00:00
endian-attr.cl
event_t.cl [OpenCL] Prohibit using reserve_id_t in program scope. 2016-11-29 10:21:40 +00:00
event_t_overload.cl [Sema] Relax overloading restrictions in C. 2016-09-02 22:59:57 +00:00
ext_vectors.cl Add .rgba syntax extension to ext_vector_type types 2016-07-22 18:49:43 +00:00
extension-begin.cl [OpenCL] Add function name to extension diagnostic 2017-06-30 14:23:01 +00:00
extension-version.cl [OpenCL] AMDGPU: add support of cl_khr_subgroups 2016-08-17 20:39:49 +00:00
extensions.cl [OpenCL] Re-enable supported core extensions based on opencl version when disabling all extensions using pragma 2017-01-06 16:14:41 +00:00
extern.cl [OpenCL] Align fake address space map with the SPIR target maps. 2016-12-23 16:11:25 +00:00
func.cl [OpenCL] Harden function pointer diagnostics. 2017-06-02 18:08:58 +00:00
half.cl [OpenCL] Allow half type kernel argument when cl_khr_fp16 is enabled 2016-09-19 17:11:22 +00:00
images.cl [OpenCL] Test on image access modifiers and image type can only be a type of a function argument. 2017-07-06 07:06:11 +00:00
init.cl
invalid-assignment-constant-address-space.cl [OpenCL] Map default address space to alloca address space 2017-04-11 17:24:23 +00:00
invalid-block.cl [OpenCL] Disallow blocks capture other blocks (v2.0, s6.12.5) 2017-02-16 11:13:30 +00:00
invalid-clk-events-cl2.0.cl [OpenCL] Prohibit using reserve_id_t in program scope. 2016-11-29 10:21:40 +00:00
invalid-constant.cl
invalid-image.cl [OpenCL] Use the semantic spelling of the Access attribute, rather than a string. 2016-11-16 11:34:09 +00:00
invalid-kernel-attrs.cl [OpenCL] Add intel_reqd_sub_group_size attribute support 2017-05-04 07:31:20 +00:00
invalid-kernel-parameters.cl [OpenCL] Allow half type kernel argument when cl_khr_fp16 is enabled 2016-09-19 17:11:22 +00:00
invalid-kernel.cl [OpenCL] Improve address space diagnostics. 2016-12-13 14:07:23 +00:00
invalid-pipe-builtin-cl2.0.cl [OpenCL] Enable subgroup extension in tests 2017-07-31 15:50:27 +00:00
invalid-pipes-cl2.0.cl Revert r306653, "[OpenCL] Allow function declaration with empty argument list." 2017-06-29 10:47:23 +00:00
lit.local.cfg
logical-ops.cl [OpenCL] Accept logical NOT for pointer types in CL1.1 2017-02-07 16:09:41 +00:00
nosvm.cl [OpenCL] Added nosvm attribute for OpenCL v2.0. 2016-03-31 11:07:22 +00:00
null_literal.cl [OpenCL 2.0] In OpenCL v2.0 s6.5 all pointers are implicitly in generic 2015-12-11 17:41:19 +00:00
null_queue.cl Fix problems in "[OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand." 2016-12-23 14:55:49 +00:00
pipes-1.2-negative.cl [OpenCL] Pipe type support 2016-01-09 12:53:17 +00:00
queue_t_overload.cl Fix problems in "[OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand." 2016-12-23 14:55:49 +00:00
sampler_t.cl [OpenCL] Check that global samplers are const 2017-05-08 09:29:06 +00:00
sampler_t_overload.cl
shifts.cl
sizeof.cl
storageclass-cl20.cl CodeGen: Cast alloca to expected address space 2017-05-18 18:51:09 +00:00
storageclass.cl [OpenCL] Diagnose scoped address-space qualified variables 2017-06-20 14:50:45 +00:00
str_literals.cl
to_addr_builtin.cl [OpenCL] Added diagnostic for implicit declaration of function in OpenCL 2017-05-30 05:57:52 +00:00
types.cl [Bug 25404] Fix crash on typedef in OpenCL 2.0 2017-04-04 16:50:46 +00:00
unroll-hint.cl [OpenCL] Enable unroll hint for OpenCL 1.x. 2016-12-13 14:02:35 +00:00
unsupported.cl Fix the spelling of 'bitfield' in diagnostics to be consistently 'bit-field'. 2016-12-20 02:43:58 +00:00
vec_compare.cl
vec_step.cl
vector_conv_invalid.cl
vector_inc_dec_ops.cl
vector_literals_const.cl
vector_literals_invalid.cl [OpenCL] Added regression test on invalid vector initialization. 2017-05-25 06:55:02 +00:00
vector_swizzle_length.cl [OpenCL] Added diagnostic for checking length of vector 2017-03-21 13:20:57 +00:00
warn-missing-prototypes.cl