llvm-project/flang/test/Integration/OpenMP/workshare-array-array-assign.f90
Ivan R. Ivanov 5d38e6e42a [flang] Introduce hlfir.elemental lowerings to omp.workshare_loop_nest (#104748)
This patch adds parallelization support for the following expression in OpenMP
workshare constructs:

* Elemental procedures in array expressions

(reapplied with linking fix)
2024-11-21 11:14:21 +09:00

35 lines
1.1 KiB
Fortran

!===----------------------------------------------------------------------===!
! 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: }