2 // RUN: %libomptarget-compile-generic
3 // RUN: env LIBOMPTARGET_INFO=16 \
4 // RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic --check-prefix=DEFAULT
5 // RUN: env LIBOMPTARGET_INFO=16 LIBOMPTARGET_MIN_THREADS_FOR_LOW_TRIP_COUNT=8 \
6 // RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic --check-prefix=EIGHT
8 // UNSUPPORTED: aarch64-unknown-linux-gnu
9 // UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
10 // UNSUPPORTED: x86_64-pc-linux-gnu
11 // UNSUPPORTED: x86_64-pc-linux-gnu-LTO
15 __attribute__((optnone
)) void optnone() {}
18 // DEFAULT: Launching kernel {{.+_main_.+}} with 4 blocks and 32 threads in SPMD mode
19 // EIGHT: Launching kernel {{.+_main_.+}} with 16 blocks and 8 threads in SPMD mode
20 #pragma omp target teams distribute parallel for simd
21 for (int i
= 0; i
< N
; ++i
) {
24 // DEFAULT: Launching kernel {{.+_main_.+}} with 4 blocks and 32 threads in SPMD mode
25 // EIGHT: Launching kernel {{.+_main_.+}} with 16 blocks and 8 threads in SPMD mode
26 #pragma omp target teams distribute parallel for simd
27 for (int i
= 0; i
< N
- 1; ++i
) {
30 // DEFAULT: Launching kernel {{.+_main_.+}} with 5 blocks and 32 threads in SPMD mode
31 // EIGHT: Launching kernel {{.+_main_.+}} with 17 blocks and 8 threads in SPMD mode
32 #pragma omp target teams distribute parallel for simd
33 for (int i
= 0; i
< N
+ 1; ++i
) {
36 // DEFAULT: Launching kernel {{.+_main_.+}} with 32 blocks and 4 threads in SPMD mode
37 // EIGHT: Launching kernel {{.+_main_.+}} with 32 blocks and 4 threads in SPMD mode
38 #pragma omp target teams distribute parallel for simd thread_limit(4)
39 for (int i
= 0; i
< N
; ++i
) {