summaryrefslogtreecommitdiff
path: root/flang/test/Integration/OpenMP/workshare-array-array-assign.f90
blob: e9ec5d9175beb5935f38f788135501bcebd9c36e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
!===----------------------------------------------------------------------===!
! This directory can be used to add Integration tests involving multiple
! stages of the compiler (for eg. from Fortran to LLVM IR). It should not
! contain executable tests. We should only add tests here sparingly and only
! if there is no other way to test. Repeat this message in each test that is
! added to this directory and sub-directories.
!===----------------------------------------------------------------------===!

!RUN: %flang_fc1 -emit-hlfir -fopenmp -O3 %s -o - | FileCheck %s --check-prefix HLFIR
!RUN: %flang_fc1 -emit-fir -fopenmp -O3 %s -o - | FileCheck %s --check-prefix FIR

subroutine sb1(x, y)
  integer :: x(:)
  integer :: y(:)
  !$omp parallel workshare
  x = y
  !$omp end parallel workshare
end subroutine

! HLFIR:     omp.parallel {
! HLFIR:       omp.workshare {
! HLFIR:         hlfir.assign
! HLFIR:         omp.terminator
! HLFIR:       }
! HLFIR:       omp.terminator
! HLFIR:     }

! FIR:     omp.parallel {
! FIR:       omp.wsloop nowait {
! FIR:         omp.loop_nest
! FIR:       }
! FIR:       omp.barrier
! FIR:       omp.terminator
! FIR:     }