Revert "[InstCombine] Support gep nuw in icmp folds" (#118698)
[llvm-project.git] / openmp / runtime / test / ompt / worksharing / sections_dispatch.c
blobae225ce17d4560a52ec9eec80149e7e784d314ed
1 // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
2 // REQUIRES: ompt
3 // UNSUPPORTED: intel-15.0, intel-16.0, intel-17.0, intel-18.0
4 // GCC generates code that does not distinguish between sections and loops
5 // UNSUPPORTED: gcc
7 #include "callback.h"
8 #include <omp.h>
10 int main()
12 #pragma omp parallel sections num_threads(2)
14 #pragma omp section
16 printf("%lu: section 1\n", ompt_get_thread_data()->value);
18 #pragma omp section
20 printf("%lu: section 2\n", ompt_get_thread_data()->value);
24 // Check if libomp supports the callbacks for this test.
25 // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_work'
26 // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_dispatch'
28 // CHECK: 0: NULL_POINTER=[[NULL:.*$]]
30 // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_sections_begin:
31 // CHECK-SAME: parallel_id=[[PARALLEL_ID:[0-9]+]],
32 // CHECK-SAME: task_id=[[TASK_ID:[0-9]+]],
33 // CHECK-SAME: codeptr_ra=[[SECT_BEGIN:0x[0-f]+]], count=2
34 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_section_begin:
35 // CHECK-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID]]
36 // CHECK-SAME: codeptr_ra=[[SECT_BEGIN]]
37 // CHECK: {{^}}[[MASTER_ID]]: ompt_event_sections_end:
38 // CHECK-SAME: parallel_id=[[PARALLEL_ID]], task_id={{[0-9]+}},
39 // CHECK-SAME: codeptr_ra=[[SECT_END:0x[0-f]+]]
41 // CHECK: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_sections_begin:
42 // CHECK-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID:[0-9]+]],
43 // CHECK-SAME: codeptr_ra=[[SECT_BEGIN]], count=2
44 // CHECK: {{^}}[[THREAD_ID]]: ompt_event_section_begin:
45 // CHECK-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID]]
46 // CHECK-SAME: codeptr_ra=[[SECT_BEGIN]]
47 // CHECK: {{^}}[[THREAD_ID]]: ompt_event_sections_end:
48 // CHECK-SAME: parallel_id=[[PARALLEL_ID]], task_id={{[0-9]+}},
49 // CHECK-SAME: codeptr_ra=[[SECT_END]]
51 return 0;