1 ! This test checks lowering of OpenACC parallel loop combined directive.
3 ! RUN: bbc -fopenacc -emit-hlfir %s -o - | FileCheck %s
5 ! CHECK-LABEL: func.func @_QPacc_parallel_loop()
7 subroutine acc_parallel_loop
13 integer :: numGangs
= 1
14 integer :: numWorkers
= 10
15 integer :: vectorLength
= 128
16 logical :: ifCondition
= .TRUE
.
17 integer, parameter :: n
= 10
18 real, dimension(n
) :: a
, b
, c
19 real, dimension(n
, n
) :: d
, e
21 integer :: reduction_i
24 integer :: gangNum
= 8
25 integer :: gangStatic
= 8
26 integer :: vectorNum
= 128
27 integer, parameter :: tileSize
= 2
29 ! CHECK: %[[A:.*]] = fir.alloca !fir.array<10xf32> {{{.*}}uniq_name = "{{.*}}Ea"}
30 ! CHECK: %[[DECLA:.*]]:2 = hlfir.declare %[[A]]
31 ! CHECK: %[[B:.*]] = fir.alloca !fir.array<10xf32> {{{.*}}uniq_name = "{{.*}}Eb"}
32 ! CHECK: %[[DECLB:.*]]:2 = hlfir.declare %[[B]]
33 ! CHECK: %[[C:.*]] = fir.alloca !fir.array<10xf32> {{{.*}}uniq_name = "{{.*}}Ec"}
34 ! CHECK: %[[DECLC:.*]]:2 = hlfir.declare %[[C]]
35 ! CHECK: %[[F:.*]] = fir.alloca !fir.box<!fir.ptr<f32>> {bindc_name = "f", uniq_name = "{{.*}}Ef"}
36 ! CHECK: %[[DECLF:.*]]:2 = hlfir.declare %[[F]]
37 ! CHECK: %[[G:.*]] = fir.alloca !fir.box<!fir.ptr<f32>> {bindc_name = "g", uniq_name = "{{.*}}Eg"}
38 ! CHECK: %[[DECLG:.*]]:2 = hlfir.declare %[[G]]
39 ! CHECK: %[[IFCONDITION:.*]] = fir.address_of(@{{.*}}ifcondition) : !fir.ref<!fir.logical<4>>
40 ! CHECK: %[[DECLIFCONDITION:.*]]:2 = hlfir.declare %[[IFCONDITION]]
49 ! CHECK: acc.parallel {
50 ! CHECK: acc.loop private{{.*}} {
61 ! CHECK: acc.parallel combined(loop) {
62 ! CHECK: acc.loop combined(parallel) private{{.*}} {
68 !$acc parallel loop async
72 !$acc end parallel loop
74 ! CHECK: acc.parallel {{.*}} {
75 ! CHECK: acc.loop {{.*}} {
79 ! CHECK-NEXT: } attributes {asyncOnly = [#acc.device_type<none>]}
81 !$acc parallel loop async(1)
86 ! CHECK: [[ASYNC1:%.*]] = arith.constant 1 : i32
87 ! CHECK: acc.parallel {{.*}} async([[ASYNC1]] : i32) {
88 ! CHECK: acc.loop {{.*}} {
94 !$acc parallel loop async(async)
99 ! CHECK: [[ASYNC2:%.*]] = fir.load %{{.*}} : !fir.ref<i32>
100 ! CHECK: acc.parallel {{.*}} async([[ASYNC2]] : i32) {
101 ! CHECK: acc.loop {{.*}} {
107 !$acc parallel loop wait
112 ! CHECK: acc.parallel {{.*}} wait {
113 ! CHECK: acc.loop {{.*}} {
119 !$acc parallel loop wait(1)
124 ! CHECK: [[WAIT1:%.*]] = arith.constant 1 : i32
125 ! CHECK: acc.parallel {{.*}} wait({[[WAIT1]] : i32}) {
132 !$acc parallel loop wait(1, 2)
137 ! CHECK: [[WAIT2:%.*]] = arith.constant 1 : i32
138 ! CHECK: [[WAIT3:%.*]] = arith.constant 2 : i32
139 ! CHECK: acc.parallel {{.*}} wait({[[WAIT2]] : i32, [[WAIT3]] : i32}) {
146 !$acc parallel loop wait(wait1, wait2)
151 ! CHECK: [[WAIT4:%.*]] = fir.load %{{.*}} : !fir.ref<i32>
152 ! CHECK: [[WAIT5:%.*]] = fir.load %{{.*}} : !fir.ref<i32>
153 ! CHECK: acc.parallel {{.*}} wait({[[WAIT4]] : i32, [[WAIT5]] : i32}) {
160 !$acc parallel loop num_gangs(1)
165 ! CHECK: [[NUMGANGS1:%.*]] = arith.constant 1 : i32
166 ! CHECK: acc.parallel {{.*}} num_gangs({[[NUMGANGS1]] : i32}) {
173 !$acc parallel loop num_gangs(numGangs)
178 ! CHECK: [[NUMGANGS2:%.*]] = fir.load %{{.*}} : !fir.ref<i32>
179 ! CHECK: acc.parallel {{.*}} num_gangs({[[NUMGANGS2]] : i32}) {
186 !$acc parallel loop num_workers(10)
191 ! CHECK: [[NUMWORKERS1:%.*]] = arith.constant 10 : i32
192 ! CHECK: acc.parallel {{.*}} num_workers([[NUMWORKERS1]] : i32) {
193 ! CHECK: acc.loop {{.*}} {
199 !$acc parallel loop num_workers(numWorkers)
204 ! CHECK: [[NUMWORKERS2:%.*]] = fir.load %{{.*}} : !fir.ref<i32>
205 ! CHECK: acc.parallel {{.*}} num_workers([[NUMWORKERS2]] : i32) {
206 ! CHECK: acc.loop {{.*}} {
212 !$acc parallel loop vector_length(128)
217 ! CHECK: [[VECTORLENGTH1:%.*]] = arith.constant 128 : i32
218 ! CHECK: acc.parallel {{.*}} vector_length([[VECTORLENGTH1]] : i32) {
219 ! CHECK: acc.loop {{.*}} {
225 !$acc parallel loop vector_length(vectorLength)
230 ! CHECK: [[VECTORLENGTH2:%.*]] = fir.load %{{.*}} : !fir.ref<i32>
231 ! CHECK: acc.parallel {{.*}} vector_length([[VECTORLENGTH2]] : i32) {
232 ! CHECK: acc.loop {{.*}} {
238 !$acc parallel loop if(.TRUE.)
243 ! CHECK: [[IF1:%.*]] = arith.constant true
244 ! CHECK: acc.parallel {{.*}} if([[IF1]]) {
245 ! CHECK: acc.loop {{.*}} {
251 !$acc parallel loop if(ifCondition)
256 ! CHECK: [[IFCOND:%.*]] = fir.load %{{.*}} : !fir.ref<!fir.logical<4>>
257 ! CHECK: [[IF2:%.*]] = fir.convert [[IFCOND]] : (!fir.logical<4>) -> i1
258 ! CHECK: acc.parallel {{.*}} if([[IF2]]) {
259 ! CHECK: acc.loop {{.*}} {
265 !$acc parallel loop self(.TRUE.)
270 ! CHECK: [[SELF1:%.*]] = arith.constant true
271 ! CHECK: acc.parallel {{.*}} self([[SELF1]]) {
272 ! CHECK: acc.loop {{.*}} {
278 !$acc parallel loop self
283 ! CHECK: acc.parallel {{.*}} {
284 ! CHECK: acc.loop {{.*}} {
288 ! CHECK-NEXT: } attributes {selfAttr}
290 !$acc parallel loop self(ifCondition)
295 ! CHECK: %[[SELF2:.*]] = fir.convert %[[DECLIFCONDITION]]#1 : (!fir.ref<!fir.logical<4>>) -> i1
296 ! CHECK: acc.parallel {{.*}} self(%[[SELF2]]) {
297 ! CHECK: acc.loop {{.*}} {
303 !$acc parallel loop copy(a, b)
308 ! CHECK: %[[COPYIN_A:.*]] = acc.copyin varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {dataClause = #acc<data_clause acc_copy>, name = "a"}
309 ! CHECK: %[[COPYIN_B:.*]] = acc.copyin varPtr(%[[DECLB]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {dataClause = #acc<data_clause acc_copy>, name = "b"}
310 ! CHECK: acc.parallel {{.*}} dataOperands(%[[COPYIN_A]], %[[COPYIN_B]] : !fir.ref<!fir.array<10xf32>>, !fir.ref<!fir.array<10xf32>>) {
311 ! CHECK: acc.loop {{.*}} {
316 ! CHECK: acc.copyout accPtr(%[[COPYIN_A]] : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) to varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10xf32>>) {dataClause = #acc<data_clause acc_copy>, name = "a"}
317 ! CHECK: acc.copyout accPtr(%[[COPYIN_B]] : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) to varPtr(%[[DECLB]]#0 : !fir.ref<!fir.array<10xf32>>) {dataClause = #acc<data_clause acc_copy>, name = "b"}
319 !$acc parallel loop copy(a) copy(b)
324 ! CHECK: %[[COPYIN_A:.*]] = acc.copyin varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {dataClause = #acc<data_clause acc_copy>, name = "a"}
325 ! CHECK: %[[COPYIN_B:.*]] = acc.copyin varPtr(%[[DECLB]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {dataClause = #acc<data_clause acc_copy>, name = "b"}
326 ! CHECK: acc.parallel {{.*}} dataOperands(%[[COPYIN_A]], %[[COPYIN_B]] : !fir.ref<!fir.array<10xf32>>, !fir.ref<!fir.array<10xf32>>) {
327 ! CHECK: acc.loop {{.*}} {
332 ! CHECK: acc.copyout accPtr(%[[COPYIN_A]] : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) to varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10xf32>>) {dataClause = #acc<data_clause acc_copy>, name = "a"}
333 ! CHECK: acc.copyout accPtr(%[[COPYIN_B]] : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) to varPtr(%[[DECLB]]#0 : !fir.ref<!fir.array<10xf32>>) {dataClause = #acc<data_clause acc_copy>, name = "b"}
335 !$acc parallel loop copyin(a) copyin(readonly: b)
340 ! CHECK: %[[COPYIN_A:.*]] = acc.copyin varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {name = "a"}
341 ! CHECK: %[[COPYIN_B:.*]] = acc.copyin varPtr(%[[DECLB]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {dataClause = #acc<data_clause acc_copyin_readonly>, name = "b"}
342 ! CHECK: acc.parallel {{.*}} dataOperands(%[[COPYIN_A]], %[[COPYIN_B]] : !fir.ref<!fir.array<10xf32>>, !fir.ref<!fir.array<10xf32>>) {
343 ! CHECK: acc.loop {{.*}} {
349 !$acc parallel loop copyout(a) copyout(zero: b)
354 ! CHECK: %[[CREATE_A:.*]] = acc.create varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {dataClause = #acc<data_clause acc_copyout>, name = "a"}
355 ! CHECK: %[[CREATE_B:.*]] = acc.create varPtr(%[[DECLB]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {dataClause = #acc<data_clause acc_copyout>, name = "b"}
356 ! CHECK: acc.parallel {{.*}} dataOperands(%[[CREATE_A]], %[[CREATE_B]] : !fir.ref<!fir.array<10xf32>>, !fir.ref<!fir.array<10xf32>>) {
357 ! CHECK: acc.loop {{.*}} {
362 ! CHECK: acc.copyout accPtr(%[[CREATE_A]] : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) to varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10xf32>>) {name = "a"}
363 ! CHECK: acc.copyout accPtr(%[[CREATE_B]] : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) to varPtr(%[[DECLB]]#0 : !fir.ref<!fir.array<10xf32>>) {name = "b"}
365 !$acc parallel loop create(b) create(zero: a)
370 ! CHECK: %[[CREATE_B:.*]] = acc.create varPtr(%[[DECLB]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {name = "b"}
371 ! CHECK: %[[CREATE_A:.*]] = acc.create varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {dataClause = #acc<data_clause acc_create_zero>, name = "a"}
372 ! CHECK: acc.parallel {{.*}} dataOperands(%[[CREATE_B]], %[[CREATE_A]] : !fir.ref<!fir.array<10xf32>>, !fir.ref<!fir.array<10xf32>>) {
373 ! CHECK: acc.loop {{.*}} {
378 ! CHECK: acc.delete accPtr(%[[CREATE_B]] : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) {dataClause = #acc<data_clause acc_create>, name = "b"}
379 ! CHECK: acc.delete accPtr(%[[CREATE_A]] : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) {dataClause = #acc<data_clause acc_create_zero>, name = "a"}
381 !$acc parallel loop no_create(a, b)
386 ! CHECK: %[[NOCREATE_A:.*]] = acc.nocreate varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {name = "a"}
387 ! CHECK: %[[NOCREATE_B:.*]] = acc.nocreate varPtr(%[[DECLB]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {name = "b"}
388 ! CHECK: acc.parallel {{.*}} dataOperands(%[[NOCREATE_A]], %[[NOCREATE_B]] : !fir.ref<!fir.array<10xf32>>, !fir.ref<!fir.array<10xf32>>) {
389 ! CHECK: acc.loop {{.*}} {
395 !$acc parallel loop present(a, b)
400 ! CHECK: %[[PRESENT_A:.*]] = acc.present varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {name = "a"}
401 ! CHECK: %[[PRESENT_B:.*]] = acc.present varPtr(%[[DECLB]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {name = "b"}
402 ! CHECK: acc.parallel {{.*}} dataOperands(%[[PRESENT_A]], %[[PRESENT_B]] : !fir.ref<!fir.array<10xf32>>, !fir.ref<!fir.array<10xf32>>) {
403 ! CHECK: acc.loop {{.*}} {
409 !$acc parallel loop deviceptr(a) deviceptr(b)
414 ! CHECK: %[[DEVICEPTR_A:.*]] = acc.deviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {name = "a"}
415 ! CHECK: %[[DEVICEPTR_B:.*]] = acc.deviceptr varPtr(%[[DECLB]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {name = "b"}
416 ! CHECK: acc.parallel {{.*}} dataOperands(%[[DEVICEPTR_A]], %[[DEVICEPTR_B]] : !fir.ref<!fir.array<10xf32>>, !fir.ref<!fir.array<10xf32>>) {
417 ! CHECK: acc.loop {{.*}} {
423 !$acc parallel loop attach(f, g)
428 ! CHECK: %[[BOX_F:.*]] = fir.load %[[DECLF]]#0 : !fir.ref<!fir.box<!fir.ptr<f32>>>
429 ! CHECK: %[[BOX_ADDR_F:.*]] = fir.box_addr %[[BOX_F]] : (!fir.box<!fir.ptr<f32>>) -> !fir.ptr<f32>
430 ! CHECK: %[[ATTACH_F:.*]] = acc.attach varPtr(%[[BOX_ADDR_F]] : !fir.ptr<f32>) -> !fir.ptr<f32> {name = "f"}
431 ! CHECK: %[[BOX_G:.*]] = fir.load %[[DECLG]]#0 : !fir.ref<!fir.box<!fir.ptr<f32>>>
432 ! CHECK: %[[BOX_ADDR_G:.*]] = fir.box_addr %[[BOX_G]] : (!fir.box<!fir.ptr<f32>>) -> !fir.ptr<f32>
433 ! CHECK: %[[ATTACH_G:.*]] = acc.attach varPtr(%[[BOX_ADDR_G]] : !fir.ptr<f32>) -> !fir.ptr<f32> {name = "g"}
434 ! CHECK: acc.parallel {{.*}} dataOperands(%[[ATTACH_F]], %[[ATTACH_G]] : !fir.ptr<f32>, !fir.ptr<f32>) {
435 ! CHECK: acc.loop {{.*}} {
441 !$acc parallel loop private(a) firstprivate(b)
446 ! CHECK: %[[ACC_PRIVATE_B:.*]] = acc.firstprivate varPtr(%[[DECLB]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {name = "b"}
447 ! CHECK: acc.parallel {{.*}} firstprivate(@firstprivatization_section_ext10_ref_10xf32 -> %[[ACC_PRIVATE_B]] : !fir.ref<!fir.array<10xf32>>) {
448 ! CHECK: %[[ACC_PRIVATE_A:.*]] = acc.private varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10xf32>>) bounds(%{{.*}}) -> !fir.ref<!fir.array<10xf32>> {name = "a"}
449 ! CHECK: acc.loop {{.*}} private({{.*}}@privatization_ref_10xf32 -> %[[ACC_PRIVATE_A]] : !fir.ref<!fir.array<10xf32>>)
450 ! CHECK-NOT: fir.do_loop
456 !$acc parallel loop seq
461 ! CHECK: acc.parallel {{.*}} {
462 ! CHECK: acc.loop {{.*}} {
464 ! CHECK-NEXT: } attributes {inclusiveUpperbound = array<i1: true>, seq = [#acc.device_type<none>]}
468 !$acc parallel loop auto
473 ! CHECK: acc.parallel {{.*}} {
474 ! CHECK: acc.loop {{.*}} {
476 ! CHECK-NEXT: } attributes {auto_ = [#acc.device_type<none>], inclusiveUpperbound = array<i1: true>}
480 !$acc parallel loop independent
485 ! CHECK: acc.parallel {{.*}} {
486 ! CHECK: acc.loop {{.*}} {
488 ! CHECK-NEXT: } attributes {inclusiveUpperbound = array<i1: true>, independent = [#acc.device_type<none>]}
492 !$acc parallel loop gang
497 ! CHECK: acc.parallel {{.*}} {
498 ! CHECK: acc.loop {{.*}} gang
500 ! CHECK-NEXT: } attributes {inclusiveUpperbound = array<i1: true>}{{$}}
504 !$acc parallel loop gang(num: 8)
509 ! CHECK: acc.parallel {{.*}} {
510 ! CHECK: [[GANGNUM1:%.*]] = arith.constant 8 : i32
511 ! CHECK-NEXT: acc.loop {{.*}} gang({num=[[GANGNUM1]] : i32})
517 !$acc parallel loop gang(num: gangNum)
522 ! CHECK: acc.parallel {{.*}} {
523 ! CHECK: [[GANGNUM2:%.*]] = fir.load %{{.*}} : !fir.ref<i32>
524 ! CHECK-NEXT: acc.loop {{.*}} gang({num=[[GANGNUM2]] : i32})
530 !$acc parallel loop gang(num: gangNum, static: gangStatic)
535 ! CHECK: acc.parallel {{.*}} {
536 ! CHECK: acc.loop {{.*}} gang({num=%{{.*}} : i32, static=%{{.*}} : i32})
542 !$acc parallel loop vector
547 ! CHECK: acc.parallel {{.*}} {
548 ! CHECK: acc.loop {{.*}} vector
550 ! CHECK-NEXT: } attributes {inclusiveUpperbound = array<i1: true>}{{$}}
554 !$acc parallel loop vector(128)
559 ! CHECK: acc.parallel {{.*}} {
560 ! CHECK: [[CONSTANT128:%.*]] = arith.constant 128 : i32
561 ! CHECK: acc.loop {{.*}} vector([[CONSTANT128]] : i32) {{.*}} {
567 !$acc parallel loop vector(vectorLength)
572 ! CHECK: acc.parallel {{.*}} {
573 ! CHECK: [[VECTORLENGTH:%.*]] = fir.load %{{.*}} : !fir.ref<i32>
574 ! CHECK: acc.loop {{.*}} vector([[VECTORLENGTH]] : i32) {{.*}} {
575 ! CHECK-NOT: fir.do_loop
581 !$acc parallel loop worker
586 ! CHECK: acc.parallel {{.*}} {
587 ! CHECK: acc.loop {{.*}} worker {{.*}} {
588 ! CHECK-NOT: fir.do_loop
590 ! CHECK-NEXT: } attributes {inclusiveUpperbound = array<i1: true>}{{$}}
594 !$acc parallel loop worker(128)
599 ! CHECK: acc.parallel {{.*}}{
600 ! CHECK: [[WORKER128:%.*]] = arith.constant 128 : i32
601 ! CHECK: acc.loop {{.*}} worker([[WORKER128]] : i32) {{.*}} {
602 ! CHECK-NOT: fir.do_loop
608 !$acc parallel loop collapse(2)
615 ! CHECK: acc.parallel {{.*}} {
616 ! CHECK: acc.loop {{.*}} {
618 ! CHECK-NEXT: } attributes {collapse = [2], collapseDeviceType = [#acc.device_type<none>], inclusiveUpperbound = array<i1: true, true>}
630 ! CHECK: acc.parallel {{.*}} {
631 ! CHECK: acc.loop {{.*}} {
632 ! CHECK: acc.loop {{.*}} {
640 !$acc parallel loop tile(2)
645 ! CHECK: acc.parallel {{.*}} {
646 ! CHECK: [[TILESIZE:%.*]] = arith.constant 2 : i32
647 ! CHECK: acc.loop {{.*}} tile({[[TILESIZE]] : i32}) {{.*}} {
653 !$acc parallel loop tile(*)
658 ! CHECK: acc.parallel {{.*}} {
659 ! CHECK: [[TILESIZEM1:%.*]] = arith.constant -1 : i32
660 ! CHECK: acc.loop {{.*}} tile({[[TILESIZEM1]] : i32}) {{.*}} {
666 !$acc parallel loop tile(2, 2)
673 ! CHECK: acc.parallel {{.*}} {
674 ! CHECK: [[TILESIZE1:%.*]] = arith.constant 2 : i32
675 ! CHECK: [[TILESIZE2:%.*]] = arith.constant 2 : i32
676 ! CHECK: acc.loop {{.*}} tile({[[TILESIZE1]] : i32, [[TILESIZE2]] : i32}) {{.*}} {
682 !$acc parallel loop tile(tileSize)
687 ! CHECK: acc.parallel {{.*}} {
688 ! CHECK: acc.loop {{.*}} tile({%{{.*}} : i32}) {{.*}} {
694 !$acc parallel loop tile(tileSize, tileSize)
701 ! CHECK: acc.parallel {{.*}} {
702 ! CHECK: acc.loop {{.*}} tile({%{{.*}} : i32, %{{.*}} : i32}) {{.*}} {
708 !$acc parallel loop reduction(+:reduction_r) reduction(*:reduction_i)
710 reduction_r
= reduction_r
+ a(i
)
714 ! CHECK: %[[COPYINREDR:.*]] = acc.copyin varPtr(%{{.*}} : !fir.ref<f32>) -> !fir.ref<f32> {dataClause = #acc<data_clause acc_reduction>, implicit = true, name = "reduction_r"}
715 ! CHECK: %[[COPYINREDI:.*]] = acc.copyin varPtr(%{{.*}} : !fir.ref<i32>) -> !fir.ref<i32> {dataClause = #acc<data_clause acc_reduction>, implicit = true, name = "reduction_i"}
716 ! CHECK: acc.parallel {{.*}} dataOperands(%[[COPYINREDR]], %[[COPYINREDI]] : !fir.ref<f32>, !fir.ref<i32>) {
717 ! CHECK: acc.loop {{.*}} reduction(@reduction_add_ref_f32 -> %{{.*}} : !fir.ref<f32>, @reduction_mul_ref_i32 -> %{{.*}} : !fir.ref<i32>) {{.*}}
722 ! CHECK: acc.copyout accPtr(%[[COPYINREDR]] : !fir.ref<f32>) to varPtr(%{{.*}} : !fir.ref<f32>) {dataClause = #acc<data_clause acc_reduction>, implicit = true, name = "reduction_r"}
723 ! CHECK: acc.copyout accPtr(%[[COPYINREDI]] : !fir.ref<i32>) to varPtr(%{{.*}} : !fir.ref<i32>) {dataClause = #acc<data_clause acc_reduction>, implicit = true, name = "reduction_i"}
729 ! CHECK: acc.parallel
731 ! CHECK-NOT: fir.do_loop
733 end subroutine acc_parallel_loop