[RISCV][VLOPT] Add vector narrowing integer right shift instructions to isSupportedIn...
[llvm-project.git] / offload / test / offloading / small_trip_count_thread_limit.cpp
blobfbd7fe9175d70534cd2831ec74db5130d6bd967e
1 // clang-format off
2 // RUN: %libomptarget-compilexx-generic
3 // RUN: env LIBOMPTARGET_INFO=16 \
4 // RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic
6 // REQUIRES: gpu
8 int main(int argc, char *argv[]) {
9 constexpr const int block_size = 256;
10 constexpr const int grid_size = 4;
11 constexpr const int count = block_size * grid_size;
13 int *data = new int[count];
15 #pragma omp target teams distribute parallel for thread_limit(block_size) map(from: data[0:count])
16 for (int i = 0; i < count; ++i)
17 data[i] = i;
19 for (int i = 0; i < count; ++i)
20 if (data[i] != i)
21 return 1;
23 delete[] data;
25 return 0;
28 // CHECK: Launching kernel {{.*}} with [4,1,1] blocks and [256,1,1] threads in SPMD mode