[RISCV] Rename a lambda to have plural nouns to reflect that it contains a loop. NFC
[llvm-project.git] / flang / test / Lower / OpenMP / wsloop-ordered.f90
blob5fa53f7b284471d81b5a7ab7c01fcf344c364fd4
1 ! This test checks lowering of worksharing-loop construct with ordered clause.
3 ! RUN: bbc -fopenmp -emit-hlfir %s -o - | FileCheck %s
5 ! This checks lowering ordered clause specified without parameter
6 subroutine wsloop_ordered_no_para()
7 integer :: a(10), i
9 ! CHECK: omp.wsloop ordered(0) {
10 ! CHECK-NEXT: omp.loop_nest (%{{.*}}) : i32 = (%{{.*}}) to (%{{.*}}) inclusive step (%{{.*}}) {
11 ! CHECK: omp.yield
12 ! CHECK: }
13 ! CHECK: }
15 !$omp do ordered
16 do i = 2, 10
17 !$omp ordered
18 a(i) = a(i-1) + 1
19 !$omp end ordered
20 end do
21 !$omp end do
23 end
25 ! This checks lowering ordered clause specified with a parameter
26 subroutine wsloop_ordered_with_para()
27 integer :: a(10), i
29 ! CHECK: func @_QPwsloop_ordered_with_para() {
30 ! CHECK: omp.wsloop ordered(1) {
31 ! CHECK-NEXT: omp.loop_nest (%{{.*}}) : i32 = (%{{.*}}) to (%{{.*}}) inclusive step (%{{.*}}) {
32 ! CHECK: omp.yield
33 ! CHECK: }
34 ! CHECK: }
36 !$omp do ordered(1)
37 do i = 2, 10
38 !!$omp ordered depend(sink: i-1)
39 a(i) = a(i-1) + 1
40 !!$omp ordered depend(source)
41 end do
42 !$omp end do
44 end