brintos

brintos / llvm-project-archived public Read only

0
0
Text · 652 B · 6997e77 Raw
19 lines · plain
1! RUN: bbc -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s2! RUN: %flang_fc1 -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s3 4! CHECK: omp.declare_reduction @[[RED:.*]] : i32 init {5 6! CHECK: func.func @_QPreduction_teams() {7subroutine reduction_teams()8  integer :: i9  i = 010 11  ! CHECK: omp.teams reduction(@[[RED]] %{{.*}}#0 -> %[[PRIV_I:.*]] : !fir.ref<i32>) {12  !$omp teams reduction(+:i)13    ! CHECK: %[[DECL_I:.*]]:2 = hlfir.declare %[[PRIV_I]]14    ! CHECK: %{{.*}} = fir.load %[[DECL_I]]#0 : !fir.ref<i32>15    ! CHECK: hlfir.assign %{{.*}} to %[[DECL_I]]#0 : i32, !fir.ref<i32>16    i = i + 117  !$omp end teams18end subroutine reduction_teams19