Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / openmp / libomptarget / test / mapping / present / unified_shared_memory.c
blobf0de92f12310e5623838357a27a4ee7e5798923f
1 // RUN: %libomptarget-compile-generic
2 // RUN: %libomptarget-run-generic 2>&1 \
3 // RUN: | %fcheck-generic
5 // REQUIRES: unified_shared_memory
7 #include <stdio.h>
9 // The runtime considers unified shared memory to be always present.
10 #pragma omp requires unified_shared_memory
12 int main() {
13 int i;
15 // CHECK-NOT: Libomptarget
16 #pragma omp target data map(alloc : i)
17 #pragma omp target map(present, alloc : i)
20 // CHECK: i is present
21 fprintf(stderr, "i is present\n");
23 // CHECK-NOT: Libomptarget
24 #pragma omp target map(present, alloc : i)
27 // CHECK: is present
28 fprintf(stderr, "i is present\n");
30 return 0;