summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOpenMP.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-11-20 15:59:03 -0500
committerAlexey Bataev <a.bataev@hotmail.com>2019-11-21 09:29:12 -0500
commit103f3c9e3b3ce663b5451e321e3800e09f851b8a (patch)
tree3fa0c2b9ea6786f70d95a2cb38f819fddce2bc8c /clang/lib/Sema/SemaOpenMP.cpp
parent6ba5cbf3ea2315acf1b7f1c39c6fec6cca5560ca (diff)
downloadbcm5719-llvm-103f3c9e3b3ce663b5451e321e3800e09f851b8a.tar.gz
bcm5719-llvm-103f3c9e3b3ce663b5451e321e3800e09f851b8a.zip
[OPENMP50]Add if clause in for simd directive.
According to OpenMP 5.0, if clause can be used in for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
Diffstat (limited to 'clang/lib/Sema/SemaOpenMP.cpp')
-rw-r--r--clang/lib/Sema/SemaOpenMP.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 7ced9eea75e..1ff25e7eb47 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -4498,6 +4498,8 @@ StmtResult Sema::ActOnOpenMPExecutableDirective(
case OMPD_for_simd:
Res = ActOnOpenMPForSimdDirective(ClausesWithImplicit, AStmt, StartLoc,
EndLoc, VarsWithInheritedDSA);
+ if (LangOpts.OpenMP >= 50)
+ AllowedNameModifiers.push_back(OMPD_simd);
break;
case OMPD_sections:
Res = ActOnOpenMPSectionsDirective(ClausesWithImplicit, AStmt, StartLoc,
@@ -10670,6 +10672,7 @@ static OpenMPDirectiveKind getOpenMPCaptureRegionForClause(
case OMPD_master_taskloop_simd:
case OMPD_target_data:
case OMPD_simd:
+ case OMPD_for_simd:
// Do not capture if-clause expressions.
break;
case OMPD_threadprivate:
@@ -10687,7 +10690,6 @@ static OpenMPDirectiveKind getOpenMPCaptureRegionForClause(
case OMPD_end_declare_target:
case OMPD_teams:
case OMPD_for:
- case OMPD_for_simd:
case OMPD_sections:
case OMPD_section:
case OMPD_single:
OpenPOWER on IntegriCloud