1 // RUN: fir-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
3 // Checks that the omp.workshare.loop_wrapper binds to the correct omp.workshare
6 %c1 = arith.constant 1 : index
7 %c42 = arith.constant 42 : index
11 omp.workshare nowait {
12 omp.workshare.loop_wrapper {
13 omp.loop_nest (%arg1) : index = (%c1) to (%c42) inclusive step (%c1) {
14 "test.test2"() : () -> ()
29 // CHECK-LABEL: func.func @wsfunc() {
30 // CHECK: %[[VAL_0:.*]] = arith.constant 1 : index
31 // CHECK: %[[VAL_1:.*]] = arith.constant 42 : index
32 // CHECK: omp.parallel {
33 // CHECK: omp.single nowait {
34 // CHECK: omp.parallel {
35 // CHECK: omp.wsloop nowait {
36 // CHECK: omp.loop_nest (%[[VAL_2:.*]]) : index = (%[[VAL_0]]) to (%[[VAL_1]]) inclusive step (%[[VAL_0]]) {
37 // CHECK: "test.test2"() : () -> ()
41 // CHECK: omp.terminator
43 // CHECK: omp.terminator
45 // CHECK: omp.terminator