39 lines · plain
1! This test checks lowering of OpenMP DO Directive(Worksharing) with2! non-monotonic schedule modifier.3 4! RUN: bbc -fopenmp -emit-hlfir %s -o - | FileCheck %s5 6program wsloop_dynamic7 integer :: i8!CHECK-LABEL: func @_QQmain()9 10 11!$OMP PARALLEL12!CHECK: omp.parallel {13 14!$OMP DO SCHEDULE(nonmonotonic:dynamic)15!CHECK: %[[WS_LB:.*]] = arith.constant 1 : i3216!CHECK: %[[WS_UB:.*]] = arith.constant 9 : i3217!CHECK: %[[WS_STEP:.*]] = arith.constant 1 : i3218!CHECK: omp.wsloop nowait schedule(dynamic, nonmonotonic) private(@{{.*}} %{{.*}}#0 -> %[[I_REF:.*]] : !fir.ref<i32>) {19!CHECK-NEXT: omp.loop_nest (%[[I:.*]]) : i32 = (%[[WS_LB]]) to (%[[WS_UB]]) inclusive step (%[[WS_STEP]]) {20!CHECK: %[[ALLOCA_IV:.*]]:2 = hlfir.declare %[[I_REF]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)21!CHECK: hlfir.assign %[[I]] to %[[ALLOCA_IV]]#0 : i32, !fir.ref<i32>22 23 do i=1, 924 print*, i25!CHECK: %[[RTBEGIN:.*]] = fir.call @_FortranAioBeginExternalListOutput26!CHECK: %[[LOAD:.*]] = fir.load %[[ALLOCA_IV]]#0 : !fir.ref<i32>27!CHECK: fir.call @_FortranAioOutputInteger32(%[[RTBEGIN]], %[[LOAD]]) {{.*}}: (!fir.ref<i8>, i32) -> i128!CHECK: fir.call @_FortranAioEndIoStatement(%[[RTBEGIN]]) {{.*}}: (!fir.ref<i8>) -> i3229 end do30!CHECK: omp.yield31!CHECK: }32!CHECK: }33!CHECK: omp.terminator34!CHECK: }35 36!$OMP END DO NOWAIT37!$OMP END PARALLEL38end39