brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 09e1211 Raw
46 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  ! CHECK: omp.target_data13  ! CHECK: omp.target14  ! CHECK: omp.teams15  ! CHECK: omp.parallel16  ! CHECK: omp.distribute17  ! CHECK: omp.wsloop18  ! CHECK: omp.loop_nest19  ! CHECK: fir.do_loop20 21  !$omp target teams workdistribute22  y = a * x + y23  !$omp end target teams workdistribute24end subroutine target_teams_workdistribute25 26! CHECK-LABEL: func @_QPteams_workdistribute27subroutine teams_workdistribute(a, x, y, rows, cols)28  use iso_fortran_env29  implicit none30 31  integer, intent(in) :: rows, cols32  real(kind=real32) :: a33  real(kind=real32), dimension(rows, cols) :: x, y34 35  ! CHECK: omp.teams36  ! CHECK: omp.parallel37  ! CHECK: omp.distribute38  ! CHECK: omp.wsloop39  ! CHECK: omp.loop_nest40  ! CHECK: fir.do_loop41 42  !$omp teams workdistribute43  y = a * x + y44  !$omp end teams workdistribute45end subroutine teams_workdistribute46