llvm-project/flang/test/Lower/OpenMP/parallel-wsloop-reduction-byref.f90
Kareem Ergawy dcb124e820
[flang][OpenMP] Enable delayed privatization by default omp.wsloop (#125732)
Reapplies #122471

This is based on https://github.com/llvm/llvm-project/pull/125699, only
the latest commit is relevant.

With changes in this PR and the parent one, the previously reported
failures in the Fujitsu(*) test suite should hopefully be resolved (I
verified all the 14 reported failures and they pass now).

(*) https://linaro.atlassian.net/browse/LLVM-1521
2025-02-06 19:11:04 +01:00

17 lines
493 B
Fortran

! Check that for parallel do, reduction is only processed for the loop
! RUN: bbc -fopenmp --force-byref-reduction -emit-hlfir %s -o - | FileCheck %s
! RUN: flang -fc1 -fopenmp -mmlir --force-byref-reduction -emit-hlfir %s -o - | FileCheck %s
! CHECK: omp.parallel {
! CHECK: omp.wsloop private({{.*}}) reduction(byref @add_reduction_byref_i32
subroutine sb
integer :: x
x = 0
!$omp parallel do reduction(+:x)
do i=1,100
x = x + 1
end do
!$omp end parallel do
end subroutine