brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 786ab91 Raw
28 lines · plain
1! This test checks lowering of OpenMP DO Directive with HLFIR.2 3! RUN: bbc -hlfir -fopenmp -emit-fir %s -o - | FileCheck %s4! RUN: %flang_fc1 -emit-fir -flang-experimental-hlfir -fopenmp %s -o - | FileCheck %s5 6!CHECK-LABEL: func @_QPsimple_loop()7subroutine simple_loop8  integer :: i9  ! CHECK-DAG:     %[[WS_ST:.*]] = arith.constant 1 : i3210  ! CHECK-DAG:     %[[WS_END:.*]] = arith.constant 9 : i3211  ! CHECK:  omp.parallel12  !$OMP PARALLEL13  ! CHECK:         omp.wsloop private(@{{.*}} %{{.*}} -> %[[ALLOCA_IV:.*]] : !fir.ref<i32>) {14  ! CHECK-NEXT:      omp.loop_nest (%[[I:.*]]) : i32 = (%[[WS_ST]]) to (%[[WS_END]]) inclusive step (%[[WS_ST]]) {15  !$OMP DO16  do i=1, 917  ! CHECK:         %[[IV:.*]]    = fir.declare %[[ALLOCA_IV]] {uniq_name = "_QFsimple_loopEi"} : (!fir.ref<i32>) -> !fir.ref<i32>18  ! CHECK:             fir.store %[[I]] to %[[IV:.*]] : !fir.ref<i32>19  ! CHECK:             %[[LOAD_IV:.*]] = fir.load %[[IV]] : !fir.ref<i32>20  ! CHECK:             fir.call @_FortranAioOutputInteger32({{.*}}, %[[LOAD_IV]]) {{.*}}: (!fir.ref<i8>, i32) -> i121    print*, i22  end do23  ! CHECK:             omp.yield24  !$OMP END DO25  ! CHECK:         omp.terminator26  !$OMP END PARALLEL27end subroutine28