Skip to content

Commit 2b68f9e

Browse files
skatrakaaryanshukla
authored andcommitted
[Flang][OpenMP] Refactor loop-related lowering for composite support (llvm#97566)
This patch splits the lowering for `omp.loop_nest` into its own function and updates lowering for all supported loop wrappers to stop creating this operation themselves. Lowering functions for loop constructs are split into "wrapper" and "standalone" variants, where the "wrapper" version only creates the specific operation with nothing inside of it and the "standalone" version calls the former and also handles clause processing and creates the nested `omp.loop_nest`. "Wrapper" lowering functions can be used by "composite" lowering functions in follow-up patches, minimizing code duplication. Tests broken as a result of reordering between the processing of the loop wrapper's and the nested `omp.loop_nest`'s clauses are also updated.
1 parent 24b7e8f commit 2b68f9e

8 files changed

+224
-213
lines changed

flang/lib/Lower/OpenMP/OpenMP.cpp

Lines changed: 168 additions & 157 deletions
Large diffs are not rendered by default.

flang/test/Lower/OpenMP/parallel-reduction3.f90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@
6969
! CHECK: omp.parallel {
7070
! CHECK: %[[VAL_14:.*]] = fir.alloca i32 {bindc_name = "i", pinned, {{.*}}}
7171
! CHECK: %[[VAL_15:.*]]:2 = hlfir.declare %[[VAL_14]] {uniq_name = "_QFsEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
72-
! CHECK: %[[VAL_16:.*]] = arith.constant 1 : i32
73-
! CHECK: %[[VAL_17:.*]] = arith.constant 100 : i32
74-
! CHECK: %[[VAL_18:.*]] = arith.constant 1 : i32
75-
! CHECK: %[[VAL_19:.*]] = fir.alloca !fir.box<!fir.array<?xi32>>
76-
! CHECK: fir.store %[[VAL_12]]#0 to %[[VAL_19]] : !fir.ref<!fir.box<!fir.array<?xi32>>>
77-
! CHECK: omp.wsloop reduction(byref @add_reduction_byref_box_Uxi32 %[[VAL_19]] -> %[[VAL_20:.*]] : !fir.ref<!fir.box<!fir.array<?xi32>>>) {
78-
! CHECK-NEXT: omp.loop_nest (%[[VAL_21:.*]]) : i32 = (%[[VAL_16]]) to (%[[VAL_17]]) inclusive step (%[[VAL_18]]) {
72+
! CHECK: %[[VAL_16:.*]] = fir.alloca !fir.box<!fir.array<?xi32>>
73+
! CHECK: fir.store %[[VAL_12]]#0 to %[[VAL_16]] : !fir.ref<!fir.box<!fir.array<?xi32>>>
74+
! CHECK: %[[VAL_17:.*]] = arith.constant 1 : i32
75+
! CHECK: %[[VAL_18:.*]] = arith.constant 100 : i32
76+
! CHECK: %[[VAL_19:.*]] = arith.constant 1 : i32
77+
! CHECK: omp.wsloop reduction(byref @add_reduction_byref_box_Uxi32 %[[VAL_16]] -> %[[VAL_20:.*]] : !fir.ref<!fir.box<!fir.array<?xi32>>>) {
78+
! CHECK-NEXT: omp.loop_nest (%[[VAL_21:.*]]) : i32 = (%[[VAL_17]]) to (%[[VAL_18]]) inclusive step (%[[VAL_19]]) {
7979
! CHECK: %[[VAL_22:.*]]:2 = hlfir.declare %[[VAL_20]] {uniq_name = "_QFsEc"} : (!fir.ref<!fir.box<!fir.array<?xi32>>>) -> (!fir.ref<!fir.box<!fir.array<?xi32>>>, !fir.ref<!fir.box<!fir.array<?xi32>>>)
8080
! CHECK: fir.store %[[VAL_21]] to %[[VAL_15]]#1 : !fir.ref<i32>
8181
! CHECK: %[[VAL_23:.*]] = fir.load %[[VAL_22]]#0 : !fir.ref<!fir.box<!fir.array<?xi32>>>

flang/test/Lower/OpenMP/simd.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ subroutine simd_with_if_clause(n, threshold)
2727
! CHECK: %[[ARG_N:.*]]:2 = hlfir.declare %{{.*}} dummy_scope %{{[0-9]+}} {uniq_name = "_QFsimd_with_if_clauseEn"} : (!fir.ref<i32>, !fir.dscope) -> (!fir.ref<i32>, !fir.ref<i32>)
2828
integer :: i, n, threshold
2929
!$OMP SIMD IF( n .GE. threshold )
30+
! CHECK: %[[COND:.*]] = arith.cmpi sge
3031
! CHECK: %[[LB:.*]] = arith.constant 1 : i32
3132
! CHECK: %[[UB:.*]] = fir.load %[[ARG_N]]#0
3233
! CHECK: %[[STEP:.*]] = arith.constant 1 : i32
33-
! CHECK: %[[COND:.*]] = arith.cmpi sge
3434
! CHECK: omp.simd if(%[[COND:.*]]) {
3535
! CHECK-NEXT: omp.loop_nest (%[[I:.*]]) : i32 = (%[[LB]]) to (%[[UB]]) inclusive step (%[[STEP]]) {
3636
do i = 1, n

flang/test/Lower/OpenMP/wsloop-chunks.f90

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ program wsloop
1616
do i=1, 9
1717
print*, i
1818

19-
! CHECK: %[[VAL_2:.*]] = arith.constant 1 : i32
20-
! CHECK: %[[VAL_3:.*]] = arith.constant 9 : i32
21-
! CHECK: %[[VAL_4:.*]] = arith.constant 1 : i32
22-
! CHECK: %[[VAL_5:.*]] = arith.constant 4 : i32
23-
! CHECK: omp.wsloop schedule(static = %[[VAL_5]] : i32) nowait {
24-
! CHECK-NEXT: omp.loop_nest (%[[ARG0:.*]]) : i32 = (%[[VAL_2]]) to (%[[VAL_3]]) inclusive step (%[[VAL_4]]) {
19+
! CHECK: %[[VAL_2:.*]] = arith.constant 4 : i32
20+
! CHECK: %[[VAL_3:.*]] = arith.constant 1 : i32
21+
! CHECK: %[[VAL_4:.*]] = arith.constant 9 : i32
22+
! CHECK: %[[VAL_5:.*]] = arith.constant 1 : i32
23+
! CHECK: omp.wsloop schedule(static = %[[VAL_2]] : i32) nowait {
24+
! CHECK-NEXT: omp.loop_nest (%[[ARG0:.*]]) : i32 = (%[[VAL_3]]) to (%[[VAL_4]]) inclusive step (%[[VAL_5]]) {
2525
! CHECK: fir.store %[[ARG0]] to %[[STORE_IV:.*]]#1 : !fir.ref<i32>
2626
! CHECK: %[[LOAD_IV:.*]] = fir.load %[[STORE_IV]]#0 : !fir.ref<i32>
2727
! CHECK: {{.*}} = fir.call @_FortranAioOutputInteger32({{.*}}, %[[LOAD_IV]]) {{.*}}: (!fir.ref<i8>, i32) -> i1
@@ -37,12 +37,12 @@ program wsloop
3737
do i=1, 9
3838
print*, i*2
3939

40-
! CHECK: %[[VAL_14:.*]] = arith.constant 1 : i32
41-
! CHECK: %[[VAL_15:.*]] = arith.constant 9 : i32
42-
! CHECK: %[[VAL_16:.*]] = arith.constant 1 : i32
43-
! CHECK: %[[VAL_17:.*]] = arith.constant 4 : i32
44-
! CHECK: omp.wsloop schedule(static = %[[VAL_17]] : i32) nowait {
45-
! CHECK-NEXT: omp.loop_nest (%[[ARG1:.*]]) : i32 = (%[[VAL_14]]) to (%[[VAL_15]]) inclusive step (%[[VAL_16]]) {
40+
! CHECK: %[[VAL_14:.*]] = arith.constant 4 : i32
41+
! CHECK: %[[VAL_15:.*]] = arith.constant 1 : i32
42+
! CHECK: %[[VAL_16:.*]] = arith.constant 9 : i32
43+
! CHECK: %[[VAL_17:.*]] = arith.constant 1 : i32
44+
! CHECK: omp.wsloop schedule(static = %[[VAL_14]] : i32) nowait {
45+
! CHECK-NEXT: omp.loop_nest (%[[ARG1:.*]]) : i32 = (%[[VAL_15]]) to (%[[VAL_16]]) inclusive step (%[[VAL_17]]) {
4646
! CHECK: fir.store %[[ARG1]] to %[[STORE_IV1:.*]]#1 : !fir.ref<i32>
4747
! CHECK: %[[VAL_24:.*]] = arith.constant 2 : i32
4848
! CHECK: %[[LOAD_IV1:.*]] = fir.load %[[STORE_IV1]]#0 : !fir.ref<i32>
@@ -64,12 +64,12 @@ program wsloop
6464
!$OMP END DO NOWAIT
6565
! CHECK: %[[VAL_28:.*]] = arith.constant 6 : i32
6666
! CHECK: hlfir.assign %[[VAL_28]] to %[[VAL_0]]#0 : i32, !fir.ref<i32>
67-
! CHECK: %[[VAL_29:.*]] = arith.constant 1 : i32
68-
! CHECK: %[[VAL_30:.*]] = arith.constant 9 : i32
69-
! CHECK: %[[VAL_31:.*]] = arith.constant 1 : i32
70-
! CHECK: %[[VAL_32:.*]] = fir.load %[[VAL_0]]#0 : !fir.ref<i32>
71-
! CHECK: omp.wsloop schedule(static = %[[VAL_32]] : i32) nowait {
72-
! CHECK-NEXT: omp.loop_nest (%[[ARG2:.*]]) : i32 = (%[[VAL_29]]) to (%[[VAL_30]]) inclusive step (%[[VAL_31]]) {
67+
! CHECK: %[[VAL_29:.*]] = fir.load %[[VAL_0]]#0 : !fir.ref<i32>
68+
! CHECK: %[[VAL_30:.*]] = arith.constant 1 : i32
69+
! CHECK: %[[VAL_31:.*]] = arith.constant 9 : i32
70+
! CHECK: %[[VAL_32:.*]] = arith.constant 1 : i32
71+
! CHECK: omp.wsloop schedule(static = %[[VAL_29]] : i32) nowait {
72+
! CHECK-NEXT: omp.loop_nest (%[[ARG2:.*]]) : i32 = (%[[VAL_30]]) to (%[[VAL_31]]) inclusive step (%[[VAL_32]]) {
7373
! CHECK: fir.store %[[ARG2]] to %[[STORE_IV2:.*]]#1 : !fir.ref<i32>
7474
! CHECK: %[[VAL_39:.*]] = arith.constant 3 : i32
7575
! CHECK: %[[LOAD_IV2:.*]] = fir.load %[[STORE_IV2]]#0 : !fir.ref<i32>

flang/test/Lower/OpenMP/wsloop-reduction-array-assumed-shape.f90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ subroutine reduce(r)
7979
! CHECK: omp.parallel {
8080
! CHECK: %[[VAL_4:.*]] = fir.alloca i32 {bindc_name = "i", pinned, {{.*}}}
8181
! CHECK: %[[VAL_5:.*]]:2 = hlfir.declare %[[VAL_4]] {uniq_name = "_QFFreduceEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
82-
! CHECK: %[[VAL_6:.*]] = arith.constant 0 : i32
83-
! CHECK: %[[VAL_7:.*]] = arith.constant 10 : i32
84-
! CHECK: %[[VAL_8:.*]] = arith.constant 1 : i32
85-
! CHECK: %[[VAL_9:.*]] = fir.alloca !fir.box<!fir.array<?xf64>>
86-
! CHECK: fir.store %[[VAL_3]]#1 to %[[VAL_9]] : !fir.ref<!fir.box<!fir.array<?xf64>>>
87-
! CHECK: omp.wsloop reduction(byref @add_reduction_byref_box_Uxf64 %[[VAL_9]] -> %[[VAL_10:.*]] : !fir.ref<!fir.box<!fir.array<?xf64>>>) {
88-
! CHECK-NEXT: omp.loop_nest (%[[VAL_11:.*]]) : i32 = (%[[VAL_6]]) to (%[[VAL_7]]) inclusive step (%[[VAL_8]]) {
82+
! CHECK: %[[VAL_6:.*]] = fir.alloca !fir.box<!fir.array<?xf64>>
83+
! CHECK: fir.store %[[VAL_3]]#1 to %[[VAL_6]] : !fir.ref<!fir.box<!fir.array<?xf64>>>
84+
! CHECK: %[[VAL_7:.*]] = arith.constant 0 : i32
85+
! CHECK: %[[VAL_8:.*]] = arith.constant 10 : i32
86+
! CHECK: %[[VAL_9:.*]] = arith.constant 1 : i32
87+
! CHECK: omp.wsloop reduction(byref @add_reduction_byref_box_Uxf64 %[[VAL_6]] -> %[[VAL_10:.*]] : !fir.ref<!fir.box<!fir.array<?xf64>>>) {
88+
! CHECK-NEXT: omp.loop_nest (%[[VAL_11:.*]]) : i32 = (%[[VAL_7]]) to (%[[VAL_8]]) inclusive step (%[[VAL_9]]) {
8989
! CHECK: %[[VAL_12:.*]]:2 = hlfir.declare %[[VAL_10]] {fortran_attrs = {{.*}}, uniq_name = "_QFFreduceEr"} : (!fir.ref<!fir.box<!fir.array<?xf64>>>) -> (!fir.ref<!fir.box<!fir.array<?xf64>>>, !fir.ref<!fir.box<!fir.array<?xf64>>>)
9090
! CHECK: fir.store %[[VAL_11]] to %[[VAL_5]]#1 : !fir.ref<i32>
9191
! CHECK: %[[VAL_13:.*]] = fir.load %[[VAL_5]]#0 : !fir.ref<i32>

flang/test/Lower/OpenMP/wsloop-reduction-array.f90

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ program reduce
7373
! CHECK: omp.parallel {
7474
! CHECK: %[[VAL_6:.*]] = fir.alloca i32 {bindc_name = "i", pinned, {{.*}}}
7575
! CHECK: %[[VAL_7:.*]]:2 = hlfir.declare %[[VAL_6]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
76-
! CHECK: %[[VAL_8:.*]] = arith.constant 0 : i32
77-
! CHECK: %[[VAL_9:.*]] = arith.constant 10 : i32
78-
! CHECK: %[[VAL_10:.*]] = arith.constant 1 : i32
79-
! CHECK: %[[VAL_11:.*]] = fir.embox %[[VAL_5]]#0(%[[VAL_4]]) : (!fir.ref<!fir.array<2xi32>>, !fir.shape<1>) -> !fir.box<!fir.array<2xi32>>
80-
! CHECK: %[[VAL_12:.*]] = fir.alloca !fir.box<!fir.array<2xi32>>
81-
! CHECK: fir.store %[[VAL_11]] to %[[VAL_12]] : !fir.ref<!fir.box<!fir.array<2xi32>>>
82-
! CHECK: omp.wsloop reduction(byref @add_reduction_byref_box_2xi32 %[[VAL_12]] -> %[[VAL_13:.*]] : !fir.ref<!fir.box<!fir.array<2xi32>>>) {
83-
! CHECK-NEXT: omp.loop_nest (%[[VAL_14:.*]]) : i32 = (%[[VAL_8]]) to (%[[VAL_9]]) inclusive step (%[[VAL_10]]) {
76+
! CHECK: %[[VAL_8:.*]] = fir.embox %[[VAL_5]]#0(%[[VAL_4]]) : (!fir.ref<!fir.array<2xi32>>, !fir.shape<1>) -> !fir.box<!fir.array<2xi32>>
77+
! CHECK: %[[VAL_9:.*]] = fir.alloca !fir.box<!fir.array<2xi32>>
78+
! CHECK: fir.store %[[VAL_8]] to %[[VAL_9]] : !fir.ref<!fir.box<!fir.array<2xi32>>>
79+
! CHECK: %[[VAL_10:.*]] = arith.constant 0 : i32
80+
! CHECK: %[[VAL_11:.*]] = arith.constant 10 : i32
81+
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
82+
! CHECK: omp.wsloop reduction(byref @add_reduction_byref_box_2xi32 %[[VAL_9]] -> %[[VAL_13:.*]] : !fir.ref<!fir.box<!fir.array<2xi32>>>) {
83+
! CHECK-NEXT: omp.loop_nest (%[[VAL_14:.*]]) : i32 = (%[[VAL_10]]) to (%[[VAL_11]]) inclusive step (%[[VAL_12]]) {
8484
! CHECK: %[[VAL_15:.*]]:2 = hlfir.declare %[[VAL_13]] {uniq_name = "_QFEr"} : (!fir.ref<!fir.box<!fir.array<2xi32>>>) -> (!fir.ref<!fir.box<!fir.array<2xi32>>>, !fir.ref<!fir.box<!fir.array<2xi32>>>)
8585
! CHECK: fir.store %[[VAL_14]] to %[[VAL_7]]#1 : !fir.ref<i32>
8686
! CHECK: %[[VAL_16:.*]] = fir.load %[[VAL_7]]#0 : !fir.ref<i32>

flang/test/Lower/OpenMP/wsloop-reduction-array2.f90

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ program reduce
7373
! CHECK: omp.parallel {
7474
! CHECK: %[[VAL_6:.*]] = fir.alloca i32 {bindc_name = "i", pinned, {{.*}}}
7575
! CHECK: %[[VAL_7:.*]]:2 = hlfir.declare %[[VAL_6]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
76-
! CHECK: %[[VAL_8:.*]] = arith.constant 0 : i32
77-
! CHECK: %[[VAL_9:.*]] = arith.constant 10 : i32
78-
! CHECK: %[[VAL_10:.*]] = arith.constant 1 : i32
79-
! CHECK: %[[VAL_11:.*]] = fir.embox %[[VAL_5]]#0(%[[VAL_4]]) : (!fir.ref<!fir.array<2xi32>>, !fir.shape<1>) -> !fir.box<!fir.array<2xi32>>
80-
! CHECK: %[[VAL_12:.*]] = fir.alloca !fir.box<!fir.array<2xi32>>
81-
! CHECK: fir.store %[[VAL_11]] to %[[VAL_12]] : !fir.ref<!fir.box<!fir.array<2xi32>>>
82-
! CHECK: omp.wsloop reduction(byref @add_reduction_byref_box_2xi32 %[[VAL_12]] -> %[[VAL_13:.*]] : !fir.ref<!fir.box<!fir.array<2xi32>>>) {
83-
! CHECK-NEXT: omp.loop_nest (%[[VAL_14:.*]]) : i32 = (%[[VAL_8]]) to (%[[VAL_9]]) inclusive step (%[[VAL_10]]) {
76+
! CHECK: %[[VAL_8:.*]] = fir.embox %[[VAL_5]]#0(%[[VAL_4]]) : (!fir.ref<!fir.array<2xi32>>, !fir.shape<1>) -> !fir.box<!fir.array<2xi32>>
77+
! CHECK: %[[VAL_9:.*]] = fir.alloca !fir.box<!fir.array<2xi32>>
78+
! CHECK: fir.store %[[VAL_8]] to %[[VAL_9]] : !fir.ref<!fir.box<!fir.array<2xi32>>>
79+
! CHECK: %[[VAL_10:.*]] = arith.constant 0 : i32
80+
! CHECK: %[[VAL_11:.*]] = arith.constant 10 : i32
81+
! CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
82+
! CHECK: omp.wsloop reduction(byref @add_reduction_byref_box_2xi32 %[[VAL_9]] -> %[[VAL_13:.*]] : !fir.ref<!fir.box<!fir.array<2xi32>>>) {
83+
! CHECK-NEXT: omp.loop_nest (%[[VAL_14:.*]]) : i32 = (%[[VAL_10]]) to (%[[VAL_11]]) inclusive step (%[[VAL_12]]) {
8484
! CHECK: %[[VAL_15:.*]]:2 = hlfir.declare %[[VAL_13]] {uniq_name = "_QFEr"} : (!fir.ref<!fir.box<!fir.array<2xi32>>>) -> (!fir.ref<!fir.box<!fir.array<2xi32>>>, !fir.ref<!fir.box<!fir.array<2xi32>>>)
8585
! CHECK: fir.store %[[VAL_14]] to %[[VAL_7]]#1 : !fir.ref<i32>
8686
! CHECK: %[[VAL_16:.*]] = fir.load %[[VAL_15]]#0 : !fir.ref<!fir.box<!fir.array<2xi32>>>

flang/test/Lower/OpenMP/wsloop-reduction-multiple-clauses.f90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ program main
109109
! CHECK: omp.parallel {
110110
! CHECK: %[[VAL_11:.*]] = fir.alloca i32 {bindc_name = "i", pinned, {{.*}}}
111111
! CHECK: %[[VAL_12:.*]]:2 = hlfir.declare %[[VAL_11]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
112-
! CHECK: %[[VAL_13:.*]] = arith.constant 1 : i32
113-
! CHECK: %[[VAL_14:.*]] = arith.constant 10 : i32
112+
! CHECK: %[[VAL_13:.*]] = fir.embox %[[VAL_4]]#0(%[[VAL_3]]) : (!fir.ref<!fir.array<3x3xf64>>, !fir.shape<2>) -> !fir.box<!fir.array<3x3xf64>>
113+
! CHECK: %[[VAL_14:.*]] = fir.alloca !fir.box<!fir.array<3x3xf64>>
114+
! CHECK: fir.store %[[VAL_13]] to %[[VAL_14]] : !fir.ref<!fir.box<!fir.array<3x3xf64>>>
114115
! CHECK: %[[VAL_15:.*]] = arith.constant 1 : i32
115-
! CHECK: %[[VAL_16:.*]] = fir.embox %[[VAL_4]]#0(%[[VAL_3]]) : (!fir.ref<!fir.array<3x3xf64>>, !fir.shape<2>) -> !fir.box<!fir.array<3x3xf64>>
116-
! CHECK: %[[VAL_17:.*]] = fir.alloca !fir.box<!fir.array<3x3xf64>>
117-
! CHECK: fir.store %[[VAL_16]] to %[[VAL_17]] : !fir.ref<!fir.box<!fir.array<3x3xf64>>>
118-
! CHECK: omp.wsloop reduction(@add_reduction_f64 %[[VAL_8]]#0 -> %[[VAL_18:.*]] : !fir.ref<f64>, byref @add_reduction_byref_box_3x3xf64 %[[VAL_17]] -> %[[VAL_19:.*]] : !fir.ref<!fir.box<!fir.array<3x3xf64>>>) {
119-
! CHECK: omp.loop_nest (%[[VAL_20:.*]]) : i32 = (%[[VAL_13]]) to (%[[VAL_14]]) inclusive step (%[[VAL_15]]) {
116+
! CHECK: %[[VAL_16:.*]] = arith.constant 10 : i32
117+
! CHECK: %[[VAL_17:.*]] = arith.constant 1 : i32
118+
! CHECK: omp.wsloop reduction(@add_reduction_f64 %[[VAL_8]]#0 -> %[[VAL_18:.*]] : !fir.ref<f64>, byref @add_reduction_byref_box_3x3xf64 %[[VAL_14]] -> %[[VAL_19:.*]] : !fir.ref<!fir.box<!fir.array<3x3xf64>>>) {
119+
! CHECK: omp.loop_nest (%[[VAL_20:.*]]) : i32 = (%[[VAL_15]]) to (%[[VAL_16]]) inclusive step (%[[VAL_17]]) {
120120
! CHECK: %[[VAL_21:.*]]:2 = hlfir.declare %[[VAL_18]] {uniq_name = "_QFEscalar"} : (!fir.ref<f64>) -> (!fir.ref<f64>, !fir.ref<f64>)
121121
! CHECK: %[[VAL_22:.*]]:2 = hlfir.declare %[[VAL_19]] {uniq_name = "_QFEarray"} : (!fir.ref<!fir.box<!fir.array<3x3xf64>>>) -> (!fir.ref<!fir.box<!fir.array<3x3xf64>>>, !fir.ref<!fir.box<!fir.array<3x3xf64>>>)
122122
! CHECK: fir.store %[[VAL_20]] to %[[VAL_12]]#1 : !fir.ref<i32>

0 commit comments

Comments
 (0)