Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / openmp / runtime / test / ompt / synchronization / barrier / for_simd.c
blob351b2c23b8cc8ff217f3f3853a853e335c318d92
1 // RUN: %libomp-compile-and-run | FileCheck %s
2 // REQUIRES: ompt
3 // XFAIL: gcc-4
5 #include "callback.h"
6 #include <omp.h>
8 int main()
10 int y[] = {0,1,2,3};
12 int i;
13 #pragma omp for simd
14 for (i = 0; i < 4; i++)
16 y[i]++;
20 // Check if libomp supports the callbacks for this test.
21 // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_sync_region'
22 // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_sync_region_wait'
24 // CHECK: 0: NULL_POINTER=[[NULL:.*$]]
26 // master thread implicit barrier at simd loop end
27 // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_barrier_begin: parallel_id={{[0-9]+}}, task_id={{[0-9]+}}, codeptr_ra={{0x[0-f]+}}
28 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_wait_barrier_begin: parallel_id={{[0-9]+}}, task_id={{[0-9]+}}, codeptr_ra={{0x[0-f]+}}
29 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_wait_barrier_end: parallel_id={{[0-9]+}}, task_id={{[0-9]+}}, codeptr_ra={{0x[0-f]+}}
30 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_barrier_end: parallel_id={{[0-9]+}}, task_id={{[0-9]+}}, codeptr_ra={{0x[0-f]+}}
32 return 0;