llvm-project/clang/test
Alexey Bataev 5e018f9e29 [OPENMP] Codegen for 'atomic capture'.
Adds codegen for 'atomic capture' constructs with the following forms of expressions/statements:

v = x binop= expr;
v = x++;
v = ++x;
v = x--;
v = --x;
v = x = x binop expr;
v = x = expr binop x;
{v = x; x = binop= expr;}
{v = x; x++;}
{v = x; ++x;}
{v = x; x--;}
{v = x; --x;}
{x = x binop expr; v = x;}
{x binop= expr; v = x;}
{x++; v = x;}
{++x; v = x;}
{x--; v = x;}
{--x; v = x;}
{x = x binop expr; v = x;}
{x = expr binop x; v = x;}
{v = x; x = expr;}
If x and expr are integer and binop is associative or x is a LHS in a RHS of the assignment expression, and atomics are allowed for type of x on the target platform atomicrmw instruction is emitted.
Otherwise compare-and-swap sequence is emitted.
Update of 'v' is not required to be be atomic with respect to the read or write of the 'x'.

bb:
...
atomic load <x>
cont:
<expected> = phi [ <x>, label %bb ], [ <new_failed>, %cont ]
<desired> = <expected> binop <expr>
<res> = cmpxchg atomic &<x>, desired, expected
<new_failed> = <res>.field1;
br <res>field2, label %exit, label %cont
exit:
atomic store <old/new x>, <v>
...
Differential Revision: http://reviews.llvm.org/D9049

llvm-svn: 235573
2015-04-23 06:35:10 +00:00
..
ARCMT [Objective-C SDK modernizer]. Patch to convert setter/getter 2015-04-02 21:36:03 +00:00
ASTMerge
Analysis [analyzer] This implements potential undefbehavior.ZeroAllocDereference checker. 2015-04-14 14:18:04 +00:00
CXX [Sema] Don't crash if array bound calculation overflowed constexpr array 2015-04-18 04:55:51 +00:00
CodeCompletion
CodeGen Unify the way we report overflow in increment/decrement operator. 2015-04-23 01:50:45 +00:00
CodeGenCUDA [cuda] Allow using integral non-type template parameters as launch_bounds attribute arguments. 2015-04-21 22:55:54 +00:00
CodeGenCXX [MS ABI] Treat ConstantArrayType like IncompleteArrayType in args 2015-04-23 05:21:20 +00:00
CodeGenObjC Revert "Revert r234581, it might have caused a few miscompiles in Chromium." 2015-04-22 21:38:15 +00:00
CodeGenObjCXX Revert "Revert r234581, it might have caused a few miscompiles in Chromium." 2015-04-22 21:38:15 +00:00
CodeGenOpenCL Remove the cl-no-signed-zeros cc1 option 2015-04-04 14:54:24 +00:00
Coverage clang/test/Coverage/html-diagnostics.c: Use find(1) to avoid globbing. 2014-11-04 13:05:10 +00:00
CoverageMapping InstrProf: Fix a shadowing error that would break length of profile names 2015-04-23 00:31:16 +00:00
Driver Expose -fdiagnostics-parseable-fixits to clang-cl 2015-04-21 23:12:03 +00:00
FixIt Move fixit for const init from note to diag, weaken to warning in MS mode. 2015-04-17 08:32:38 +00:00
Format
Frontend Fix typo in my last commit. 2015-03-03 00:12:08 +00:00
Headers Make this test not rely on a backend being registered. 2015-04-03 01:27:02 +00:00
Index [libclang] Add functions to get information about fields. 2015-04-13 16:55:04 +00:00
Integration
Layout PR6037 2015-01-19 01:44:02 +00:00
Lexer [lex] Don't read past the end of the buffer 2015-03-29 14:11:37 +00:00
Misc Generate a diagnostic when a catch handler cannot execute due to class hierarchy inversion with regards to other catch handlers for the same block. 2015-04-08 00:05:29 +00:00
Modules [modules] Allow a function template definition if we have a pre-existing but not visible definition of the same template. 2015-03-27 21:57:41 +00:00
OpenMP [OPENMP] Codegen for 'atomic capture'. 2015-04-23 06:35:10 +00:00
PCH Use raw_pwrite_stream in clang. 2015-04-14 15:15:49 +00:00
Parser [MS ABI] Correctly associate align attrs before the class-key 2015-04-19 07:53:29 +00:00
Preprocessor [MSVC] Mimic MSVC whitespace collapse for incompatible token pasting 2015-04-17 12:43:57 +00:00
Profile Fix this test so it doesn't try to open a file to write to the source tree 2015-04-06 16:33:18 +00:00
Rewriter [Objective-C modern translation]. Patch to fix type of 2015-04-09 18:36:50 +00:00
Sema Implement target-specific __attribute__((aligned)) value 2015-04-21 17:29:35 +00:00
SemaCUDA [cuda] Allow using integral non-type template parameters as launch_bounds attribute arguments. 2015-04-21 22:55:54 +00:00
SemaCXX Don't dllimport/export class members with internal linkage (PR23308) 2015-04-22 04:05:17 +00:00
SemaObjC [Sema] Check availability of ObjC super class and protocols of a container 2015-04-19 20:15:55 +00:00
SemaObjCXX [Objective-C Sema] Fixes a typo which did not allow 2015-04-10 22:07:47 +00:00
SemaOpenCL Restores r228382, which was reverted in r228406. 2015-02-25 05:48:23 +00:00
SemaTemplate Improve the error message for assigning to read-only variables. 2015-04-11 01:53:13 +00:00
TableGen
Tooling Remove "REQUIRES:shell" from tests. They work for me. 2014-11-04 13:41:33 +00:00
Unit
VFS DebugInfo: Move new hierarchy into place (clang) 2015-03-03 17:25:55 +00:00
.clang-format
CMakeLists.txt Revert "Wrap clang module files in a Mach-O, ELF, or COFF container." 2015-02-25 02:44:04 +00:00
Makefile Fix makefile for debuginfo-tests execution. 2014-10-17 23:50:47 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg Check for backtraces in tests which are verifying pretty stack traces from a crashing clang. 2015-02-10 19:53:38 +00:00
lit.site.cfg.in Check for backtraces in tests which are verifying pretty stack traces from a crashing clang. 2015-02-10 19:53:38 +00:00
make_test_dirs.pl