Files
Amit Tiwari 1d18740d30 [Clang][OpenMP] Implement Loop splitting #pragma omp split directive (#190397)
Implement Loop-splitting #pragma omp split construct with counts clause.
Posting this PR after the revert of PR
([#183261](https://github.com/llvm/llvm-project/pull/183261))

Changes: 

1. Added `openmp/runtime/test/transform/split/lit.local.cfg`
2. Enforced ICE for `counts` clause items in `SemaOpenMP.cpp` (minor
change)
3. Updated tests `split_messages.cpp`, `split_omp_fill.cpp`,
`split_diag_errors.c`.
4. Removed `nonconstant_count.cpp`
2026-04-13 12:39:40 +05:30

23 lines
705 B
C++

// `#pragma omp split` / `counts` require OpenMP 6.x in this implementation.
//
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -std=c++17 -fopenmp -fopenmp-version=60 -fsyntax-only -DONLY_OK -verify %s
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -std=c++17 -fopenmp -fopenmp-version=52 -fsyntax-only -DONLY_BAD52 -verify=expected52 %s
#if defined(ONLY_OK)
void ok60(void) {
#pragma omp split counts(omp_fill)
for (int i = 0; i < 10; ++i) {
}
}
// expected-no-diagnostics
#endif
#if defined(ONLY_BAD52)
// expected52-error@+2 {{unexpected OpenMP clause 'counts' in directive '#pragma omp split'}}
void bad52(void) {
#pragma omp split counts(omp_fill)
for (int i = 0; i < 10; ++i) {
}
}
#endif