r347405 - [OPENMP] Support relational-op != (not-equal) as one of the canonical
Kelvin Li via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 21 11:10:49 PST 2018
Author: kli
Date: Wed Nov 21 11:10:48 2018
New Revision: 347405
URL: http://llvm.org/viewvc/llvm-project?rev=347405&view=rev
Log:
[OPENMP] Support relational-op != (not-equal) as one of the canonical
forms of random access iterator
In OpenMP 4.5, only 4 relational operators are supported: <, <=, >,
and >=. This work is to enable support for relational operator
!= (not-equal) as one of the canonical forms.
Patch by Anh Tuyen Tran
Differential Revision: https://reviews.llvm.org/D54441
Modified:
cfe/trunk/lib/Sema/SemaOpenMP.cpp
cfe/trunk/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/distribute_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/for_loop_messages.cpp
cfe/trunk/test/OpenMP/for_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_ast_print.cpp
cfe/trunk/test/OpenMP/parallel_for_codegen.cpp
cfe/trunk/test/OpenMP/parallel_for_loop_messages.cpp
cfe/trunk/test/OpenMP/parallel_for_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/simd_loop_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_loop_messages.cpp
cfe/trunk/test/OpenMP/target_parallel_for_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/target_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_loop_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/taskloop_loop_messages.cpp
cfe/trunk/test/OpenMP/taskloop_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_loop_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp
cfe/trunk/test/OpenMP/teams_distribute_simd_loop_messages.cpp
Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOpenMP.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOpenMP.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOpenMP.cpp Wed Nov 21 11:10:48 2018
@@ -3905,7 +3905,8 @@ class OpenMPIterationSpaceChecker {
/// Var <= UB
/// UB > Var
/// UB >= Var
- bool TestIsLessOp = false;
+ /// This will have no value when the condition is !=
+ llvm::Optional<bool> TestIsLessOp;
/// This flag is true when condition is strict ( < or > ).
bool TestIsStrictOp = false;
/// This flag is true when step is subtracted on each iteration.
@@ -3971,8 +3972,8 @@ private:
/// Helper to set loop counter variable and its initializer.
bool setLCDeclAndLB(ValueDecl *NewLCDecl, Expr *NewDeclRefExpr, Expr *NewLB);
/// Helper to set upper bound.
- bool setUB(Expr *NewUB, bool LessOp, bool StrictOp, SourceRange SR,
- SourceLocation SL);
+ bool setUB(Expr *NewUB, llvm::Optional<bool> LessOp, bool StrictOp,
+ SourceRange SR, SourceLocation SL);
/// Helper to set loop increment.
bool setStep(Expr *NewStep, bool Subtract);
};
@@ -4007,15 +4008,17 @@ bool OpenMPIterationSpaceChecker::setLCD
return false;
}
-bool OpenMPIterationSpaceChecker::setUB(Expr *NewUB, bool LessOp, bool StrictOp,
- SourceRange SR, SourceLocation SL) {
+bool OpenMPIterationSpaceChecker::setUB(Expr *NewUB, llvm::Optional<bool> LessOp,
+ bool StrictOp, SourceRange SR,
+ SourceLocation SL) {
// State consistency checking to ensure correct usage.
assert(LCDecl != nullptr && LB != nullptr && UB == nullptr &&
Step == nullptr && !TestIsLessOp && !TestIsStrictOp);
if (!NewUB)
return true;
UB = NewUB;
- TestIsLessOp = LessOp;
+ if (LessOp)
+ TestIsLessOp = LessOp;
TestIsStrictOp = StrictOp;
ConditionSrcRange = SR;
ConditionLoc = SL;
@@ -4055,18 +4058,23 @@ bool OpenMPIterationSpaceChecker::setSte
bool IsConstPos =
IsConstant && Result.isSigned() && (Subtract == Result.isNegative());
bool IsConstZero = IsConstant && !Result.getBoolValue();
+
+ // != with increment is treated as <; != with decrement is treated as >
+ if (!TestIsLessOp.hasValue())
+ TestIsLessOp = IsConstPos || (IsUnsigned && !Subtract);
if (UB && (IsConstZero ||
- (TestIsLessOp ? (IsConstNeg || (IsUnsigned && Subtract))
- : (IsConstPos || (IsUnsigned && !Subtract))))) {
+ (TestIsLessOp.getValue() ?
+ (IsConstNeg || (IsUnsigned && Subtract)) :
+ (IsConstPos || (IsUnsigned && !Subtract))))) {
SemaRef.Diag(NewStep->getExprLoc(),
diag::err_omp_loop_incr_not_compatible)
- << LCDecl << TestIsLessOp << NewStep->getSourceRange();
+ << LCDecl << TestIsLessOp.getValue() << NewStep->getSourceRange();
SemaRef.Diag(ConditionLoc,
diag::note_omp_loop_cond_requres_compatible_incr)
- << TestIsLessOp << ConditionSrcRange;
+ << TestIsLessOp.getValue() << ConditionSrcRange;
return true;
}
- if (TestIsLessOp == Subtract) {
+ if (TestIsLessOp.getValue() == Subtract) {
NewStep =
SemaRef.CreateBuiltinUnaryOp(NewStep->getExprLoc(), UO_Minus, NewStep)
.get();
@@ -4207,7 +4215,12 @@ bool OpenMPIterationSpaceChecker::checkA
(BO->getOpcode() == BO_GT || BO->getOpcode() == BO_GE),
(BO->getOpcode() == BO_LT || BO->getOpcode() == BO_GT),
BO->getSourceRange(), BO->getOperatorLoc());
- }
+ } else if (BO->getOpcode() == BO_NE)
+ return setUB(getInitLCDecl(BO->getLHS()) == LCDecl ?
+ BO->getRHS() : BO->getLHS(),
+ /*LessOp=*/llvm::None,
+ /*StrictOp=*/true,
+ BO->getSourceRange(), BO->getOperatorLoc());
} else if (auto *CE = dyn_cast<CXXOperatorCallExpr>(S)) {
if (CE->getNumArgs() == 2) {
auto Op = CE->getOperator();
@@ -4225,6 +4238,14 @@ bool OpenMPIterationSpaceChecker::checkA
Op == OO_Less || Op == OO_Greater, CE->getSourceRange(),
CE->getOperatorLoc());
break;
+ case OO_ExclaimEqual:
+ return setUB(getInitLCDecl(CE->getArg(0)) == LCDecl ?
+ CE->getArg(1) : CE->getArg(0),
+ /*LessOp=*/llvm::None,
+ /*StrictOp=*/true,
+ CE->getSourceRange(),
+ CE->getOperatorLoc());
+ break;
default:
break;
}
@@ -4373,8 +4394,8 @@ Expr *OpenMPIterationSpaceChecker::build
if (VarType->isIntegerType() || VarType->isPointerType() ||
SemaRef.getLangOpts().CPlusPlus) {
// Upper - Lower
- Expr *UBExpr = TestIsLessOp ? UB : LB;
- Expr *LBExpr = TestIsLessOp ? LB : UB;
+ Expr *UBExpr = TestIsLessOp.getValue() ? UB : LB;
+ Expr *LBExpr = TestIsLessOp.getValue() ? LB : UB;
Expr *Upper = tryBuildCapture(SemaRef, UBExpr, Captures).get();
Expr *Lower = tryBuildCapture(SemaRef, LBExpr, Captures).get();
if (!Upper || !Lower)
@@ -4475,8 +4496,9 @@ Expr *OpenMPIterationSpaceChecker::build
ExprResult CondExpr =
SemaRef.BuildBinOp(S, DefaultLoc,
- TestIsLessOp ? (TestIsStrictOp ? BO_LT : BO_LE)
- : (TestIsStrictOp ? BO_GT : BO_GE),
+ TestIsLessOp.getValue() ?
+ (TestIsStrictOp ? BO_LT : BO_LE) :
+ (TestIsStrictOp ? BO_GT : BO_GE),
NewLB.get(), NewUB.get());
if (CondExpr.isUsable()) {
if (!SemaRef.Context.hasSameUnqualifiedType(CondExpr.get()->getType(),
@@ -4554,9 +4576,9 @@ Expr *OpenMPIterationSpaceChecker::build
SemaRef.getLangOpts().CPlusPlus) {
// Upper - Lower
Expr *Upper =
- TestIsLessOp ? Cnt : tryBuildCapture(SemaRef, UB, Captures).get();
+ TestIsLessOp.getValue() ? Cnt : tryBuildCapture(SemaRef, UB, Captures).get();
Expr *Lower =
- TestIsLessOp ? tryBuildCapture(SemaRef, LB, Captures).get() : Cnt;
+ TestIsLessOp.getValue() ? tryBuildCapture(SemaRef, LB, Captures).get() : Cnt;
if (!Upper || !Lower)
return nullptr;
Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -144,9 +144,9 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
+// Ok
#pragma omp target
#pragma omp teams
-// expected-error at +2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
#pragma omp distribute parallel for simd
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/distribute_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_simd_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/distribute_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/distribute_simd_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -135,9 +135,9 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
+ // Ok
#pragma omp target
#pragma omp teams
- // expected-error at +2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
#pragma omp distribute simd
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/for_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -131,8 +131,8 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
+// Ok
#pragma omp parallel
-// expected-error at +2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
#pragma omp for
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/for_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/for_simd_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/for_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/for_simd_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -126,8 +126,8 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
+// Ok
#pragma omp parallel
-// expected-error at +2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
#pragma omp for simd
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/parallel_for_ast_print.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_ast_print.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_ast_print.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_ast_print.cpp Wed Nov 21 11:10:48 2018
@@ -103,6 +103,29 @@ T tmain(T argc) {
return T();
}
+int increment () {
+ #pragma omp for
+ for (int i = 5 ; i != 0; ++i)
+ ;
+ // CHECK: int increment() {
+ // CHECK-NEXT: #pragma omp for
+ // CHECK-NEXT: for (int i = 5; i != 0; ++i)
+ // CHECK-NEXT: ;
+ return 0;
+}
+
+int decrement_nowait () {
+ #pragma omp for nowait
+ for (int j = 5 ; j != 0; --j)
+ ;
+ // CHECK: int decrement_nowait() {
+ // CHECK-NEXT: #pragma omp for nowait
+ // CHECK-NEXT: for (int j = 5; j != 0; --j)
+ // CHECK-NEXT: ;
+ return 0;
+}
+
+
int main(int argc, char **argv) {
int b = argc, c, d, e, f, h;
static int a;
Modified: cfe/trunk/test/OpenMP/parallel_for_codegen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_codegen.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_codegen.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_codegen.cpp Wed Nov 21 11:10:48 2018
@@ -376,5 +376,85 @@ void parallel_for(float *a, const int n)
// TERM_DEBUG-DAG: [[DBG_LOC_START]] = !DILocation(line: [[@LINE-4]],
// TERM_DEBUG-DAG: [[DBG_LOC_END]] = !DILocation(line: [[@LINE-18]],
+// CHECK-LABEL: increment
+int increment () {
+// CHECK: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num([[IDENT_T_TY]]* [[DEFAULT_LOC:[@%].+]])
+ #pragma omp for
+// Determine UB = min(UB, GlobalUB)
+// CHECK: call void @__kmpc_for_static_init_4([[IDENT_T_TY]]* [[LOOP_LOC]], i32 [[GTID]], i32 34, i32* [[IS_LAST:%[^,]+]], i32* [[OMP_LB:%[^,]+]], i32* [[OMP_UB:%[^,]+]], i32* [[OMP_ST:%[^,]+]], i32 1, i32 1)
+// CHECK-NEXT: [[UB:%.+]] = load i32, i32* [[OMP_UB]]
+// CHECK-NEXT: [[UBCMP:%.+]] = icmp sgt i32 [[UB]], 4
+// CHECK-NEXT: br i1 [[UBCMP]], label [[UB_TRUE:%[^,]+]], label [[UB_FALSE:%[^,]+]]
+// CHECK: [[UBRESULT:%.+]] = phi i32 [ 4, [[UB_TRUE]] ], [ [[UBVAL:%[^,]+]], [[UB_FALSE]] ]
+// CHECK-NEXT: store i32 [[UBRESULT]], i32* [[OMP_UB]]
+// CHECK-NEXT: [[LB:%.+]] = load i32, i32* [[OMP_LB]]
+// CHECK-NEXT: store i32 [[LB]], i32* [[OMP_IV:[^,]+]]
+// CHECK-NEXT: br label %[[LOOP1_HEAD:.+]]
+
+// Loop header
+// CHECK: [[LOOP1_HEAD]]
+// CHECK: [[IV:%.+]] = load i32, i32* [[OMP_IV]]
+// CHECK-NEXT: [[UB:%.+]] = load i32, i32* [[OMP_UB]]
+// CHECK-NEXT: [[CMP:%.+]] = icmp sle i32 [[IV]], [[UB]]
+// CHECK-NEXT: br i1 [[CMP]], label %[[LOOP1_BODY:[^,]+]], label %[[LOOP1_END:[^,]+]]
+
+ for (int i = 0 ; i != 5; ++i)
+// Start of body: calculate i from IV:
+// CHECK: [[LOOP1_BODY]]
+// CHECK: [[IV1_1:%.+]] = load i32, i32* [[OMP_IV]]
+// CHECK-NEXT: [[CALC_I_1:%.+]] = mul nsw i32 [[IV1_1]], 1
+// CHECK-NEXT: [[CALC_I_2:%.+]] = add nsw i32 0, [[CALC_I_1]]
+// CHECK-NEXT: store i32 [[CALC_I_2]], i32* [[LC_I:.+]]
+// CHECK: [[IV1_2:%.+]] = load i32, i32* [[OMP_IV]]{{.*}}
+// CHECK-NEXT: [[ADD1_2:%.+]] = add nsw i32 [[IV1_2]], 1
+// CHECK-NEXT: store i32 [[ADD1_2]], i32* [[OMP_IV]]
+// CHECK-NEXT: br label %[[LOOP1_HEAD]]
+ ;
+// CHECK: [[LOOP1_END]]
+// CHECK: call void @__kmpc_for_static_fini([[IDENT_T_TY]]* [[LOOP_LOC]], i32 [[GTID]])
+// CHECK: __kmpc_barrier
+ return 0;
+// CHECK: ret i32 0
+}
+
+// CHECK-LABEL: decrement_nowait
+int decrement_nowait () {
+// CHECK: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num([[IDENT_T_TY]]* [[DEFAULT_LOC:[@%].+]])
+ #pragma omp for nowait
+// Determine UB = min(UB, GlobalUB)
+// CHECK: call void @__kmpc_for_static_init_4([[IDENT_T_TY]]* [[LOOP_LOC]], i32 [[GTID]], i32 34, i32* [[IS_LAST:%[^,]+]], i32* [[OMP_LB:%[^,]+]], i32* [[OMP_UB:%[^,]+]], i32* [[OMP_ST:%[^,]+]], i32 1, i32 1)
+// CHECK-NEXT: [[UB:%.+]] = load i32, i32* [[OMP_UB]]
+// CHECK-NEXT: [[UBCMP:%.+]] = icmp sgt i32 [[UB]], 4
+// CHECK-NEXT: br i1 [[UBCMP]], label [[UB_TRUE:%[^,]+]], label [[UB_FALSE:%[^,]+]]
+// CHECK: [[UBRESULT:%.+]] = phi i32 [ 4, [[UB_TRUE]] ], [ [[UBVAL:%[^,]+]], [[UB_FALSE]] ]
+// CHECK-NEXT: store i32 [[UBRESULT]], i32* [[OMP_UB]]
+// CHECK-NEXT: [[LB:%.+]] = load i32, i32* [[OMP_LB]]
+// CHECK-NEXT: store i32 [[LB]], i32* [[OMP_IV:[^,]+]]
+// CHECK-NEXT: br label %[[LOOP1_HEAD:.+]]
+
+// Loop header
+// CHECK: [[LOOP1_HEAD]]
+// CHECK: [[IV:%.+]] = load i32, i32* [[OMP_IV]]
+// CHECK-NEXT: [[UB:%.+]] = load i32, i32* [[OMP_UB]]
+// CHECK-NEXT: [[CMP:%.+]] = icmp sle i32 [[IV]], [[UB]]
+// CHECK-NEXT: br i1 [[CMP]], label %[[LOOP1_BODY:[^,]+]], label %[[LOOP1_END:[^,]+]]
+ for (int j = 5 ; j != 0; --j)
+// Start of body: calculate i from IV:
+// CHECK: [[LOOP1_BODY]]
+// CHECK: [[IV2_1:%.+]] = load i32, i32* [[OMP_IV]]
+// CHECK-NEXT: [[CALC_II_1:%.+]] = mul nsw i32 [[IV2_1]], 1
+// CHECK-NEXT: [[CALC_II_2:%.+]] = sub nsw i32 5, [[CALC_II_1]]
+// CHECK-NEXT: store i32 [[CALC_II_2]], i32* [[LC_I:.+]]
+// CHECK: [[IV2_2:%.+]] = load i32, i32* [[OMP_IV]]{{.*}}
+// CHECK-NEXT: [[ADD2_2:%.+]] = add nsw i32 [[IV2_2]], 1
+// CHECK-NEXT: store i32 [[ADD2_2]], i32* [[OMP_IV]]
+// CHECK-NEXT: br label %[[LOOP1_HEAD]]
+ ;
+// CHECK: [[LOOP1_END]]
+// CHECK: call void @__kmpc_for_static_fini([[IDENT_T_TY]]* [[LOOP_LOC]], i32 [[GTID]])
+// CHECK-NOT: __kmpc_barrier
+ return 0;
+// CHECK: ret i32 0
+}
#endif // HEADER
Modified: cfe/trunk/test/OpenMP/parallel_for_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -108,7 +108,7 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
-// expected-error at +2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+// Ok
#pragma omp parallel for
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/parallel_for_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/parallel_for_simd_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/parallel_for_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/parallel_for_simd_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -108,7 +108,7 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
-// expected-error at +2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+// Ok
#pragma omp parallel for simd
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/simd_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/simd_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -99,7 +99,7 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
- // expected-error at +2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+ // Ok
#pragma omp simd
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/target_parallel_for_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -108,7 +108,7 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
-// expected-error at +2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+// Ok
#pragma omp target parallel for
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/target_parallel_for_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_for_simd_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_parallel_for_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_parallel_for_simd_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -108,7 +108,7 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
-// expected-error at +2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+// Ok
#pragma omp target parallel for simd
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/target_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_simd_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_simd_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -108,7 +108,7 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
-// expected-error at +2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+// Ok
#pragma omp target simd
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -108,8 +108,8 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
+// Ok
#pragma omp target teams distribute
-// expected-error at +1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -108,8 +108,8 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
+// Ok
#pragma omp target teams distribute parallel for
-// expected-error at +1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -108,8 +108,8 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
+// Ok
#pragma omp target teams distribute parallel for simd
-// expected-error at +1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -108,8 +108,8 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
+// Ok
#pragma omp target teams distribute simd
-// expected-error at +1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/taskloop_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -131,8 +131,8 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
+// Ok
#pragma omp parallel
-// expected-error at +2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
#pragma omp taskloop
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/taskloop_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/taskloop_simd_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/taskloop_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/taskloop_simd_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -131,8 +131,8 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
+// Ok
#pragma omp parallel
-// expected-error at +2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
#pragma omp taskloop simd
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/teams_distribute_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -126,9 +126,9 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
+// Ok
#pragma omp target
#pragma omp teams distribute
-// expected-error at +1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -126,9 +126,9 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
+// Ok
#pragma omp target
#pragma omp teams distribute parallel for
-// expected-error at +1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -126,9 +126,9 @@ int test_iteration_spaces() {
for (int i = 0; !!i; i++)
c[i] = a[i];
+// Ok
#pragma omp target
#pragma omp teams distribute parallel for simd
-// expected-error at +1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
for (int i = 0; i != 1; i++)
c[i] = a[i];
Modified: cfe/trunk/test/OpenMP/teams_distribute_simd_loop_messages.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_distribute_simd_loop_messages.cpp?rev=347405&r1=347404&r2=347405&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/teams_distribute_simd_loop_messages.cpp (original)
+++ cfe/trunk/test/OpenMP/teams_distribute_simd_loop_messages.cpp Wed Nov 21 11:10:48 2018
@@ -128,7 +128,7 @@ int test_iteration_spaces() {
#pragma omp target
#pragma omp teams distribute simd
-// expected-error at +1 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+// Ok
for (int i = 0; i != 1; i++)
c[i] = a[i];
More information about the cfe-commits
mailing list