[RISCV][VLOPT] Add vector narrowing integer right shift instructions to isSupportedIn...
[llvm-project.git] / offload / test / offloading / high_trip_count_block_limit.cpp
blob12d76d80d72fc07ae42cb83fbc887c67e91a170f
1 // clang-format off
2 // RUN: %libomptarget-compilexx-generic && env LIBOMPTARGET_REUSE_BLOCKS_FOR_HIGH_TRIP_COUNT=False %libomptarget-run-generic 2>&1 | %fcheck-generic
3 // RUN: %libomptarget-compilexx-generic && %libomptarget-run-generic 2>&1 | %fcheck-generic --check-prefix=DEFAULT
5 // UNSUPPORTED: aarch64-unknown-linux-gnu
6 // UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
7 // UNSUPPORTED: x86_64-unknown-linux-gnu
8 // UNSUPPORTED: x86_64-unknown-linux-gnu-LTO
9 // UNSUPPORTED: s390x-ibm-linux-gnu
10 // UNSUPPORTED: s390x-ibm-linux-gnu-LTO
11 // clang-format on
14 Check if there is a thread for each loop iteration
16 #include <omp.h>
17 #include <stdio.h>
19 int main() {
20 int N = 819200;
21 int num_threads[N];
23 #pragma omp target teams distribute parallel for
24 for (int j = 0; j < N; j++) {
25 num_threads[j] = omp_get_num_threads() * omp_get_num_teams();
28 if (num_threads[0] == N)
29 // CHECK: PASS
30 printf("PASS\n");
31 else
32 // DEFAULT: FAIL
33 printf("FAIL: num_threads: %d\n != N: %d", num_threads[0], N);
34 return 0;