brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 92aeb3f Raw
43 lines · plain
1! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization-staging \2! RUN:   -o - %s 2>&1 | FileCheck %s3! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization-staging -o - %s 2>&1 \4! RUN:   | FileCheck %s5 6subroutine standalone_distribute7    implicit none8    integer :: simple_var, i9 10    !$omp teams11    !$omp distribute private(simple_var)12    do i = 1, 1013      simple_var = simple_var + i14    end do15    !$omp end distribute16    !$omp end teams17end subroutine standalone_distribute18 19! CHECK: omp.private {type = private} @[[I_PRIVATIZER_SYM:.*]] : i3220! CHECK: omp.private {type = private} @[[VAR_PRIVATIZER_SYM:.*]] : i3221 22 23! CHECK-LABEL: func.func @_QPstandalone_distribute() {24! CHECK:         %[[I_DECL:.*]]:2 = hlfir.declare %{{.*}} {uniq_name = "_QFstandalone_distributeEi"}25! CHECK:         %[[VAR_DECL:.*]]:2 = hlfir.declare %{{.*}} {uniq_name = "_QFstandalone_distributeEsimple_var"}26! CHECK:         omp.teams {27! CHECK:           omp.distribute28! CHECK-SAME:        private(@[[VAR_PRIVATIZER_SYM]] %[[VAR_DECL]]#0 -> %[[VAR_ARG:[^,]+]],29! CHECK-SAME:                @[[I_PRIVATIZER_SYM]] %[[I_DECL]]#0 -> %[[I_ARG:.*]] : !fir.ref<i32>, !fir.ref<i32>) {30! CHECK:             omp.loop_nest {{.*}} {31! CHECK:               %[[VAR_PRIV_DECL:.*]]:2 = hlfir.declare %[[VAR_ARG]]32! CHECK:               %[[I_PRIV_DECL:.*]]:2 = hlfir.declare %[[I_ARG]]33 34! CHECK:               hlfir.assign %{{.*}} to %[[I_PRIV_DECL]]#0 : i32, !fir.ref<i32>35! CHECK:               %{{.*}} = fir.load %[[VAR_PRIV_DECL]]#0 : !fir.ref<i32>36! CHECK:               %{{.*}} = fir.load %[[I_PRIV_DECL]]#0 : !fir.ref<i32>37! CHECK:               arith.addi %{{.*}}, %{{.*}} : i3238! CHECK:               hlfir.assign %{{.*}} to %[[VAR_PRIV_DECL]]#0 : i32, !fir.ref<i32>39! CHECK:             }40! CHECK:           }41! CHECK:         }42! CHECK:       }43