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`
24 lines
448 B
C
24 lines
448 B
C
// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
int main() {
|
|
printf("do\n");
|
|
#pragma omp split counts(omp_fill, 2)
|
|
for (int i = 0; i < 7; ++i)
|
|
printf("i=%d\n", i);
|
|
printf("done\n");
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|
|
// CHECK: do
|
|
// CHECK-NEXT: i=0
|
|
// CHECK-NEXT: i=1
|
|
// CHECK-NEXT: i=2
|
|
// CHECK-NEXT: i=3
|
|
// CHECK-NEXT: i=4
|
|
// CHECK-NEXT: i=5
|
|
// CHECK-NEXT: i=6
|
|
// CHECK-NEXT: done
|