brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 98fb9cf Raw
35 lines · plain
1! This test checks lowering of OpenMP DO Directive (Worksharing) with2! 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!$OMP PARALLEL11!CHECK:  omp.parallel {12 13!$OMP DO SCHEDULE(monotonic:dynamic)14!CHECK:     %[[WS_LB:.*]] = arith.constant 1 : i3215!CHECK:     %[[WS_UB:.*]] = arith.constant 9 : i3216!CHECK:     %[[WS_STEP:.*]] = arith.constant 1 : i3217!CHECK:     omp.wsloop nowait schedule(dynamic, monotonic) private({{.*}}) {18!CHECK-NEXT:  omp.loop_nest (%[[I:.*]]) : i32 = (%[[WS_LB]]) to (%[[WS_UB]]) inclusive step (%[[WS_STEP]]) {19!CHECK:         hlfir.assign %[[I]] to %[[ALLOCA_IV:.*]]#0 : i32, !fir.ref<i32>20 21  do i=1, 922    print*, i23!CHECK:         %[[RTBEGIN:.*]] = fir.call @_FortranAioBeginExternalListOutput24!CHECK:         %[[LOAD:.*]] = fir.load %[[ALLOCA_IV]]#0 : !fir.ref<i32>25!CHECK:         fir.call @_FortranAioOutputInteger32(%[[RTBEGIN]], %[[LOAD]]) {{.*}}: (!fir.ref<i8>, i32) -> i126!CHECK:         fir.call @_FortranAioEndIoStatement(%[[RTBEGIN]]) {{.*}}: (!fir.ref<i8>) -> i3227  end do28!CHECK:         omp.yield29!CHECK:     omp.terminator30!CHECK:   }31 32!$OMP END DO NOWAIT33!$OMP END PARALLEL34end35