69 lines · plain
1! RUN: %flang_fc1 -emit-fir -fopenmp -fopenmp-version=60 %s -o - | FileCheck %s2 3! CHECK-LABEL: func @_QPtarget_teams_workdistribute4subroutine target_teams_workdistribute(a, x, y, rows, cols)5 use iso_fortran_env6 implicit none7 8 integer, intent(in) :: rows, cols9 real(kind=real32) :: a10 real(kind=real32), dimension(rows, cols) :: x, y11 12 !$omp target teams workdistribute13 14 ! CHECK: omp.target_data15 ! CHECK: omp.target16 ! CHECK: omp.teams17 ! CHECK: omp.parallel18 ! CHECK: omp.distribute19 ! CHECK: omp.wsloop20 ! CHECK: omp.loop_nest21 ! CHECK: fir.do_loop22 23 y = a * x + y24 25 ! CHECK: omp.target26 ! CHECK: omp.teams27 ! CHECK: omp.parallel28 ! CHECK: omp.distribute29 ! CHECK: omp.wsloop30 ! CHECK: omp.loop_nest31 ! CHECK: fir.do_loop32 33 y = a * y + x34 35 !$omp end target teams workdistribute36end subroutine target_teams_workdistribute37 38! CHECK-LABEL: func @_QPteams_workdistribute39subroutine teams_workdistribute(a, x, y, rows, cols)40 use iso_fortran_env41 implicit none42 43 integer, intent(in) :: rows, cols44 real(kind=real32) :: a45 real(kind=real32), dimension(rows, cols) :: x, y46 47 !$omp teams workdistribute48 49 ! CHECK: omp.teams50 ! CHECK: omp.parallel51 ! CHECK: omp.distribute52 ! CHECK: omp.wsloop53 ! CHECK: omp.loop_nest54 ! CHECK: fir.do_loop55 56 y = a * x + y57 58 ! CHECK: omp.teams59 ! CHECK: omp.parallel60 ! CHECK: omp.distribute61 ! CHECK: omp.wsloop62 ! CHECK: omp.loop_nest63 ! CHECK: fir.do_loop64 65 y = a * y + x66 67 !$omp end teams workdistribute68end subroutine teams_workdistribute69