diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -11577,6 +11577,9 @@ static bool CheckValue(const Expr *E, ErrorInfoTy &ErrorInfo, bool ShouldBeLValue, bool ShouldBeInteger = false) { + if (E->isInstantiationDependent()) + return true; + if (ShouldBeLValue && !E->isLValue()) { ErrorInfo.Error = ErrorTy::XNotLValue; ErrorInfo.ErrorLoc = ErrorInfo.NoteLoc = E->getExprLoc(); @@ -11584,25 +11587,23 @@ return false; } - if (!E->isInstantiationDependent()) { - QualType QTy = E->getType(); - if (!QTy->isScalarType()) { - ErrorInfo.Error = ErrorTy::NotScalar; - ErrorInfo.ErrorLoc = ErrorInfo.NoteLoc = E->getExprLoc(); - ErrorInfo.ErrorRange = ErrorInfo.NoteRange = E->getSourceRange(); - return false; - } - if (ShouldBeInteger && !QTy->isIntegerType()) { - ErrorInfo.Error = ErrorTy::NotInteger; - ErrorInfo.ErrorLoc = ErrorInfo.NoteLoc = E->getExprLoc(); - ErrorInfo.ErrorRange = ErrorInfo.NoteRange = E->getSourceRange(); - return false; - } + QualType QTy = E->getType(); + if (!QTy->isScalarType()) { + ErrorInfo.Error = ErrorTy::NotScalar; + ErrorInfo.ErrorLoc = ErrorInfo.NoteLoc = E->getExprLoc(); + ErrorInfo.ErrorRange = ErrorInfo.NoteRange = E->getSourceRange(); + return false; + } + if (ShouldBeInteger && !QTy->isIntegerType()) { + ErrorInfo.Error = ErrorTy::NotInteger; + ErrorInfo.ErrorLoc = ErrorInfo.NoteLoc = E->getExprLoc(); + ErrorInfo.ErrorRange = ErrorInfo.NoteRange = E->getSourceRange(); + return false; } return true; } -}; + }; bool OpenMPAtomicCompareChecker::checkCondUpdateStmt(IfStmt *S, ErrorInfoTy &ErrorInfo) { diff --git a/clang/test/OpenMP/atomic_ast_print.cpp b/clang/test/OpenMP/atomic_ast_print.cpp --- a/clang/test/OpenMP/atomic_ast_print.cpp +++ b/clang/test/OpenMP/atomic_ast_print.cpp @@ -1433,4 +1433,4987 @@ return foo(a); } +#ifdef OMP51 + +template Ty ffoo(Ty *x, Ty e, Ty d) { + Ty v; + bool r; + +#pragma omp atomic compare capture + { + v = *x; + if (*x > e) + *x = e; + } +#pragma omp atomic compare capture + { + v = *x; + if (*x < e) + *x = e; + } +#pragma omp atomic compare capture + { + v = *x; + if (*x == e) + *x = d; + } +#pragma omp atomic compare capture + { + if (*x > e) + *x = e; + v = *x; + } +#pragma omp atomic compare capture + { + if (*x < e) + *x = e; + v = *x; + } +#pragma omp atomic compare capture + { + if (*x == e) + *x = d; + v = *x; + } +#pragma omp atomic compare capture + { + if (*x == e) + *x = d; + else + v = *x; + } +#pragma omp atomic compare capture + { + r = *x == e; + if (r) + *x = d; + } +#pragma omp atomic compare capture + { + r = *x == e; + if (r) + *x = d; + else + v = *x; + } + +#pragma omp atomic compare capture acq_rel + { + v = *x; + if (*x > e) + *x = e; + } +#pragma omp atomic compare capture acq_rel + { + v = *x; + if (*x < e) + *x = e; + } +#pragma omp atomic compare capture acq_rel + { + v = *x; + if (*x == e) + *x = d; + } +#pragma omp atomic compare capture acq_rel + { + if (*x > e) + *x = e; + v = *x; + } +#pragma omp atomic compare capture acq_rel + { + if (*x < e) + *x = e; + v = *x; + } +#pragma omp atomic compare capture acq_rel + { + if (*x == e) + *x = d; + v = *x; + } +#pragma omp atomic compare capture acq_rel + { + if (*x == e) + *x = d; + else + v = *x; + } +#pragma omp atomic compare capture acq_rel + { + r = *x == e; + if (r) + *x = d; + } +#pragma omp atomic compare capture acq_rel + { + r = *x == e; + if (r) + *x = d; + else + v = *x; + } + +#pragma omp atomic compare capture acquire + { + v = *x; + if (*x > e) + *x = e; + } +#pragma omp atomic compare capture acquire + { + v = *x; + if (*x < e) + *x = e; + } +#pragma omp atomic compare capture acquire + { + v = *x; + if (*x == e) + *x = d; + } +#pragma omp atomic compare capture acquire + { + if (*x > e) + *x = e; + v = *x; + } +#pragma omp atomic compare capture acquire + { + if (*x < e) + *x = e; + v = *x; + } +#pragma omp atomic compare capture acquire + { + if (*x == e) + *x = d; + v = *x; + } +#pragma omp atomic compare capture acquire + { + if (*x == e) + *x = d; + else + v = *x; + } +#pragma omp atomic compare capture acquire + { + r = *x == e; + if (r) + *x = d; + } +#pragma omp atomic compare capture acquire + { + r = *x == e; + if (r) + *x = d; + else + v = *x; + } + +#pragma omp atomic compare capture relaxed + { + v = *x; + if (*x > e) + *x = e; + } +#pragma omp atomic compare capture relaxed + { + v = *x; + if (*x < e) + *x = e; + } +#pragma omp atomic compare capture relaxed + { + v = *x; + if (*x == e) + *x = d; + } +#pragma omp atomic compare capture relaxed + { + if (*x > e) + *x = e; + v = *x; + } +#pragma omp atomic compare capture relaxed + { + if (*x < e) + *x = e; + v = *x; + } +#pragma omp atomic compare capture relaxed + { + if (*x == e) + *x = d; + v = *x; + } +#pragma omp atomic compare capture relaxed + { + if (*x == e) + *x = d; + else + v = *x; + } +#pragma omp atomic compare capture relaxed + { + r = *x == e; + if (r) + *x = d; + } +#pragma omp atomic compare capture relaxed + { + r = *x == e; + if (r) + *x = d; + else + v = *x; + } + +#pragma omp atomic compare capture release + { + v = *x; + if (*x > e) + *x = e; + } +#pragma omp atomic compare capture release + { + v = *x; + if (*x < e) + *x = e; + } +#pragma omp atomic compare capture release + { + v = *x; + if (*x == e) + *x = d; + } +#pragma omp atomic compare capture release + { + if (*x > e) + *x = e; + v = *x; + } +#pragma omp atomic compare capture release + { + if (*x < e) + *x = e; + v = *x; + } +#pragma omp atomic compare capture release + { + if (*x == e) + *x = d; + v = *x; + } +#pragma omp atomic compare capture release + { + if (*x == e) + *x = d; + else + v = *x; + } +#pragma omp atomic compare capture release + { + r = *x == e; + if (r) + *x = d; + } +#pragma omp atomic compare capture release + { + r = *x == e; + if (r) + *x = d; + else + v = *x; + } + +#pragma omp atomic compare capture seq_cst + { + v = *x; + if (*x > e) + *x = e; + } +#pragma omp atomic compare capture seq_cst + { + v = *x; + if (*x < e) + *x = e; + } +#pragma omp atomic compare capture seq_cst + { + v = *x; + if (*x == e) + *x = d; + } +#pragma omp atomic compare capture seq_cst + { + if (*x > e) + *x = e; + v = *x; + } +#pragma omp atomic compare capture seq_cst + { + if (*x < e) + *x = e; + v = *x; + } +#pragma omp atomic compare capture seq_cst + { + if (*x == e) + *x = d; + v = *x; + } +#pragma omp atomic compare capture seq_cst + { + if (*x == e) + *x = d; + else + v = *x; + } +#pragma omp atomic compare capture seq_cst + { + r = *x == e; + if (r) + *x = d; + } +#pragma omp atomic compare capture seq_cst + { + r = *x == e; + if (r) + *x = d; + else + v = *x; + } + + return v; +} + +void bbaarr() { + { + char x, e, d; + ffoo(&x, e, d); + } + + { + unsigned char x, e, d; + ffoo(&x, e, d); + } + + { + short x, e, d; + ffoo(&x, e, d); + } + + { + unsigned short x, e, d; + ffoo(&x, e, d); + } + + { + int x, e, d; + ffoo(&x, e, d); + } + + { + unsigned int x, e, d; + ffoo(&x, e, d); + } + + { + long x, e, d; + ffoo(&x, e, d); + } + + { + unsigned long x, e, d; + ffoo(&x, e, d); + } + + { + long long x, e, d; + ffoo(&x, e, d); + } + + { + unsigned long long x, e, d; + ffoo(&x, e, d); + } + + { + float x, e, d; + ffoo(&x, e, d); + } + + { + double x, e, d; + ffoo(&x, e, d); + } +} + +// CHECK-51: template Ty ffoo(Ty *x, Ty e, Ty d) { +// CHECK-51-NEXT: Ty v; +// CHECK-51-NEXT: bool r; +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: return v; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: template<> char ffoo(char *x, char e, char d) { +// CHECK-51-NEXT: char v; +// CHECK-51-NEXT: bool r; +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: return v; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: template<> unsigned char ffoo(unsigned char *x, unsigned char e, unsigned char d) { +// CHECK-51-NEXT: unsigned char v; +// CHECK-51-NEXT: bool r; +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: return v; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: template<> short ffoo(short *x, short e, short d) { +// CHECK-51-NEXT: short v; +// CHECK-51-NEXT: bool r; +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: return v; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: template<> unsigned short ffoo(unsigned short *x, unsigned short e, unsigned short d) { +// CHECK-51-NEXT: unsigned short v; +// CHECK-51-NEXT: bool r; +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: return v; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: template<> int ffoo(int *x, int e, int d) { +// CHECK-51-NEXT: int v; +// CHECK-51-NEXT: bool r; +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: return v; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: template<> unsigned int ffoo(unsigned int *x, unsigned int e, unsigned int d) { +// CHECK-51-NEXT: unsigned int v; +// CHECK-51-NEXT: bool r; +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: return v; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: template<> long ffoo(long *x, long e, long d) { +// CHECK-51-NEXT: long v; +// CHECK-51-NEXT: bool r; +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: return v; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: template<> unsigned long ffoo(unsigned long *x, unsigned long e, unsigned long d) { +// CHECK-51-NEXT: unsigned long v; +// CHECK-51-NEXT: bool r; +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: return v; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: template<> long long ffoo(long long *x, long long e, long long d) { +// CHECK-51-NEXT: long long v; +// CHECK-51-NEXT: bool r; +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: return v; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: template<> unsigned long long ffoo(unsigned long long *x, unsigned long long e, unsigned long long d) { +// CHECK-51-NEXT: unsigned long long v; +// CHECK-51-NEXT: bool r; +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: return v; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: template<> float ffoo(float *x, float e, float d) { +// CHECK-51-NEXT: float v; +// CHECK-51-NEXT: bool r; +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: return v; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: template<> double ffoo(double *x, double e, double d) { +// CHECK-51-NEXT: double v; +// CHECK-51-NEXT: bool r; +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acq_rel +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture acquire +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture relaxed +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture release +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x > e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x < e) +// CHECK-51-NEXT: *x = e; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: if (*x == e) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: #pragma omp atomic compare capture seq_cst +// CHECK-51-NEXT: { +// CHECK-51-NEXT: r = *x == e; +// CHECK-51-NEXT: if (r) +// CHECK-51-NEXT: *x = d; +// CHECK-51-NEXT: else +// CHECK-51-NEXT: v = *x; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: return v; +// CHECK-51-NEXT: } +// CHECK-51-NEXT: void bbaarr() { +// CHECK-51-NEXT: { +// CHECK-51-NEXT: char x, e, d; +// CHECK-51-NEXT: ffoo(&x, e, d); +// CHECK-51-NEXT: } +// CHECK-51-NEXT: { +// CHECK-51-NEXT: unsigned char x, e, d; +// CHECK-51-NEXT: ffoo(&x, e, d); +// CHECK-51-NEXT: } +// CHECK-51-NEXT: { +// CHECK-51-NEXT: short x, e, d; +// CHECK-51-NEXT: ffoo(&x, e, d); +// CHECK-51-NEXT: } +// CHECK-51-NEXT: { +// CHECK-51-NEXT: unsigned short x, e, d; +// CHECK-51-NEXT: ffoo(&x, e, d); +// CHECK-51-NEXT: } +// CHECK-51-NEXT: { +// CHECK-51-NEXT: int x, e, d; +// CHECK-51-NEXT: ffoo(&x, e, d); +// CHECK-51-NEXT: } +// CHECK-51-NEXT: { +// CHECK-51-NEXT: unsigned int x, e, d; +// CHECK-51-NEXT: ffoo(&x, e, d); +// CHECK-51-NEXT: } +// CHECK-51-NEXT: { +// CHECK-51-NEXT: long x, e, d; +// CHECK-51-NEXT: ffoo(&x, e, d); +// CHECK-51-NEXT: } +// CHECK-51-NEXT: { +// CHECK-51-NEXT: unsigned long x, e, d; +// CHECK-51-NEXT: ffoo(&x, e, d); +// CHECK-51-NEXT: } +// CHECK-51-NEXT: { +// CHECK-51-NEXT: long long x, e, d; +// CHECK-51-NEXT: ffoo(&x, e, d); +// CHECK-51-NEXT: } +// CHECK-51-NEXT: { +// CHECK-51-NEXT: unsigned long long x, e, d; +// CHECK-51-NEXT: ffoo(&x, e, d); +// CHECK-51-NEXT: } +// CHECK-51-NEXT: { +// CHECK-51-NEXT: float x, e, d; +// CHECK-51-NEXT: ffoo(&x, e, d); +// CHECK-51-NEXT: } +// CHECK-51-NEXT: { +// CHECK-51-NEXT: double x, e, d; +// CHECK-51-NEXT: ffoo(&x, e, d); +// CHECK-51-NEXT: } +// CHECK-51-NEXT: } + +#endif + #endif