brintos

brintos / llvm-project-archived public Read only

0
0
Text · 853 B · ab56a4f Raw
33 lines · plain
1! RUN: %flang_fc1 -emit-hlfir -fopenmp -fdo-concurrent-to-openmp=host %s -o - \2! RUN:   | FileCheck %s3 4subroutine test1(x,s,N)5  real :: x(N), s6  integer :: N7  do concurrent(i=1:N) reduce(+:s)8     s=s+x(i)9  end do10end subroutine test111subroutine test2(x,s,N)12  real :: x(N), s13  integer :: N14  do concurrent(i=1:N) reduce(+:s)15     s=s+x(i)16  end do17end subroutine test218 19! CHECK:       omp.declare_reduction @[[RED_SYM:.*]] : f32 init20! CHECK-NOT:   omp.declare_reduction21 22! CHECK-LABEL: func.func @_QPtest123! CHECK:         omp.parallel {24! CHECK:           omp.wsloop reduction(@[[RED_SYM]] {{.*}} : !fir.ref<f32>) {25! CHECK:           }26! CHECK:         }27 28! CHECK-LABEL: func.func @_QPtest229! CHECK:         omp.parallel {30! CHECK:           omp.wsloop reduction(@[[RED_SYM]] {{.*}} : !fir.ref<f32>) {31! CHECK:           }32! CHECK:         }33