57 lines · plain
1!RUN: split-file %s %t2 3!RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=50 %t/no_bind_clause.f90 -o - \4!RUN: | FileCheck %s5 6!RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=50 %t/bind_clause_teams.f90 -o - \7!RUN: | FileCheck %s8 9!--- no_bind_clause.f9010subroutine target_teams_loop11 implicit none12 integer :: x, i13 14 !$omp teams loop15 do i = 0, 1016 x = x + i17 end do18end subroutine target_teams_loop19 20!--- bind_clause_teams.f9021subroutine target_teams_loop22 implicit none23 integer :: x, i24 25 !$omp teams loop bind(teams)26 do i = 0, 1027 x = x + i28 end do29end subroutine target_teams_loop30 31!CHECK-LABEL: func.func @_QPtarget_teams_loop32!CHECK: %[[I_DECL:.*]]:2 = hlfir.declare %{{.*}} {uniq_name = "{{.*}}i"}33!CHECK: %[[X_DECL:.*]]:2 = hlfir.declare %{{.*}} {uniq_name = "{{.*}}x"}34 35!CHECK: omp.teams {36 37!CHECK: %[[LB:.*]] = arith.constant 0 : i3238!CHECK: %[[UB:.*]] = arith.constant 10 : i3239!CHECK: %[[STEP:.*]] = arith.constant 1 : i3240 41!CHECK: omp.parallel private(@{{.*}} %[[I_DECL]]#0 42!CHECK-SAME: -> %[[I_PRIV_ARG:[^[:space:]]+]] : !fir.ref<i32>) {43!CHECK: omp.distribute {44!CHECK: omp.wsloop {45 46!CHECK: omp.loop_nest (%{{.*}}) : i32 = 47!CHECK-SAME: (%[[LB]]) to (%[[UB]]) inclusive step (%[[STEP]]) {48!CHECK: %[[I_PRIV_DECL:.*]]:2 = hlfir.declare %[[I_PRIV_ARG]]49!CHECK: hlfir.assign %{{.*}} to %[[I_PRIV_DECL]]#0 : i32, !fir.ref<i32>50!CHECK: hlfir.assign %{{.*}} to %[[X_DECL]]#0 : i32, !fir.ref<i32>51!CHECK: }52!CHECK: }53!CHECK: }54!CHECK: }55!CHECK: }56!CHECK: }57