Skip to content

Commit f9dbfb1

Browse files
authored
[flang][acc] Update assembly formats to include asyncOnly, async, and wait (#140122)
The async implementation is inconsistent in terms of the assembly format. While renaming `UpdateOp`'s `async` to `asyncOnly`, this PR handles `asyncOnly` along with async operands in every operation. Regarding `EnterDataOp` and `ExitDataOp`, they do not accept device types; thus, the async and the wait clauses without values lead to the `async` and the `wait` attributes (not `asyncOnly` nor `waitOnly`). This PR also processes them with async and wait operands all together.
1 parent 6033a48 commit f9dbfb1

19 files changed

+225
-135
lines changed

flang/test/Lower/OpenACC/acc-data-unwrap-defaultbounds.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ subroutine acc_data
155155
!$acc data present(a) async
156156
!$acc end data
157157

158-
! CHECK: acc.data dataOperands(%{{.*}}) {
159-
! CHECK: } attributes {asyncOnly = [#acc.device_type<none>]}
158+
! CHECK: acc.data async dataOperands(%{{.*}}) {
159+
! CHECK: }
160160

161161
!$acc data copy(a) async(1)
162162
!$acc end data

flang/test/Lower/OpenACC/acc-data.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ subroutine acc_data
155155
!$acc data present(a) async
156156
!$acc end data
157157

158-
! CHECK: acc.data dataOperands(%{{.*}}) {
159-
! CHECK: } attributes {asyncOnly = [#acc.device_type<none>]}
158+
! CHECK: acc.data async dataOperands(%{{.*}}) {
159+
! CHECK: }
160160

161161
!$acc data copy(a) async(1)
162162
!$acc end data

flang/test/Lower/OpenACC/acc-enter-data-unwrap-defaultbounds.f90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,20 @@ subroutine acc_enter_data
9494
!$acc enter data create(a) async
9595
!CHECK: %[[BOUND0:.*]] = acc.bounds lowerbound(%{{.*}} : index) upperbound(%{{.*}} : index) extent(%[[C10]] : index) stride(%c1{{.*}} : index) startIdx(%{{.*}} : index)
9696
!CHECK: %[[BOUND1:.*]] = acc.bounds lowerbound(%{{.*}} : index) upperbound(%{{.*}} : index) extent(%[[EXTENT_C10]] : index) stride(%c1{{.*}} : index) startIdx(%{{.*}} : index)
97-
!CHECK: %[[CREATE_A:.*]] = acc.create varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) bounds(%[[BOUND0]], %[[BOUND1]]) -> !fir.ref<!fir.array<10x10xf32>> {asyncOnly = [#acc.device_type<none>], name = "a", structured = false}
98-
!CHECK: acc.enter_data dataOperands(%[[CREATE_A]] : !fir.ref<!fir.array<10x10xf32>>) attributes {async}
97+
!CHECK: %[[CREATE_A:.*]] = acc.create varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) bounds(%[[BOUND0]], %[[BOUND1]]) async -> !fir.ref<!fir.array<10x10xf32>> {name = "a", structured = false}
98+
!CHECK: acc.enter_data async dataOperands(%[[CREATE_A]] : !fir.ref<!fir.array<10x10xf32>>)
9999

100100
!$acc enter data create(a) wait
101101
!CHECK: %[[BOUND0:.*]] = acc.bounds lowerbound(%{{.*}} : index) upperbound(%{{.*}} : index) extent(%[[C10]] : index) stride(%c1{{.*}} : index) startIdx(%{{.*}} : index)
102102
!CHECK: %[[BOUND1:.*]] = acc.bounds lowerbound(%{{.*}} : index) upperbound(%{{.*}} : index) extent(%[[EXTENT_C10]] : index) stride(%c1{{.*}} : index) startIdx(%{{.*}} : index)
103103
!CHECK: %[[CREATE_A:.*]] = acc.create varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) bounds(%[[BOUND0]], %[[BOUND1]]) -> !fir.ref<!fir.array<10x10xf32>> {name = "a", structured = false}
104-
!CHECK: acc.enter_data dataOperands(%[[CREATE_A]] : !fir.ref<!fir.array<10x10xf32>>) attributes {wait}
104+
!CHECK: acc.enter_data wait dataOperands(%[[CREATE_A]] : !fir.ref<!fir.array<10x10xf32>>)
105105

106106
!$acc enter data create(a) async wait
107107
!CHECK: %[[BOUND0:.*]] = acc.bounds lowerbound(%{{.*}} : index) upperbound(%{{.*}} : index) extent(%[[C10]] : index) stride(%c1{{.*}} : index) startIdx(%{{.*}} : index)
108108
!CHECK: %[[BOUND1:.*]] = acc.bounds lowerbound(%{{.*}} : index) upperbound(%{{.*}} : index) extent(%[[EXTENT_C10]] : index) stride(%c1{{.*}} : index) startIdx(%{{.*}} : index)
109-
!CHECK: %[[CREATE_A:.*]] = acc.create varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) bounds(%[[BOUND0]], %[[BOUND1]]) -> !fir.ref<!fir.array<10x10xf32>> {asyncOnly = [#acc.device_type<none>], name = "a", structured = false}
110-
!CHECK: acc.enter_data dataOperands(%[[CREATE_A]] : !fir.ref<!fir.array<10x10xf32>>) attributes {async, wait}
109+
!CHECK: %[[CREATE_A:.*]] = acc.create varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) bounds(%[[BOUND0]], %[[BOUND1]]) async -> !fir.ref<!fir.array<10x10xf32>> {name = "a", structured = false}
110+
!CHECK: acc.enter_data async wait dataOperands(%[[CREATE_A]] : !fir.ref<!fir.array<10x10xf32>>)
111111

112112
!$acc enter data create(a) async(1)
113113
!CHECK: %[[ASYNC1:.*]] = arith.constant 1 : i32

flang/test/Lower/OpenACC/acc-enter-data.f90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ subroutine acc_enter_data
5353
!CHECK: acc.enter_data dataOperands(%[[COPYIN_A]], %[[CREATE_B]], %[[ATTACH_D]] : !fir.ref<!fir.array<10x10xf32>>, !fir.ref<!fir.array<10x10xf32>>, !fir.ref<!fir.box<!fir.ptr<f32>>>){{$}}
5454

5555
!$acc enter data create(a) async
56-
!CHECK: %[[CREATE_A:.*]] = acc.create varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) -> !fir.ref<!fir.array<10x10xf32>> {asyncOnly = [#acc.device_type<none>], name = "a", structured = false}
57-
!CHECK: acc.enter_data dataOperands(%[[CREATE_A]] : !fir.ref<!fir.array<10x10xf32>>) attributes {async}
56+
!CHECK: %[[CREATE_A:.*]] = acc.create varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) async -> !fir.ref<!fir.array<10x10xf32>> {name = "a", structured = false}
57+
!CHECK: acc.enter_data async dataOperands(%[[CREATE_A]] : !fir.ref<!fir.array<10x10xf32>>)
5858

5959
!$acc enter data create(a) wait
6060
!CHECK: %[[CREATE_A:.*]] = acc.create varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) -> !fir.ref<!fir.array<10x10xf32>> {name = "a", structured = false}
61-
!CHECK: acc.enter_data dataOperands(%[[CREATE_A]] : !fir.ref<!fir.array<10x10xf32>>) attributes {wait}
61+
!CHECK: acc.enter_data wait dataOperands(%[[CREATE_A]] : !fir.ref<!fir.array<10x10xf32>>)
6262

6363
!$acc enter data create(a) async wait
64-
!CHECK: %[[CREATE_A:.*]] = acc.create varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) -> !fir.ref<!fir.array<10x10xf32>> {asyncOnly = [#acc.device_type<none>], name = "a", structured = false}
65-
!CHECK: acc.enter_data dataOperands(%[[CREATE_A]] : !fir.ref<!fir.array<10x10xf32>>) attributes {async, wait}
64+
!CHECK: %[[CREATE_A:.*]] = acc.create varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) async -> !fir.ref<!fir.array<10x10xf32>> {name = "a", structured = false}
65+
!CHECK: acc.enter_data async wait dataOperands(%[[CREATE_A]] : !fir.ref<!fir.array<10x10xf32>>)
6666

6767
!$acc enter data create(a) async(1)
6868
!CHECK: %[[ASYNC1:.*]] = arith.constant 1 : i32

flang/test/Lower/OpenACC/acc-exit-data-unwrap-defaultbounds.f90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ subroutine acc_exit_data
5656
!CHECK: acc.detach accPtr(%[[DEVPTR_D]] : !fir.ptr<f32>) {name = "d", structured = false}
5757

5858
!$acc exit data delete(a) async
59-
!CHECK: %[[DEVPTR:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) -> !fir.ref<!fir.array<10x10xf32>> {asyncOnly = [#acc.device_type<none>], dataClause = #acc<data_clause acc_delete>, name = "a", structured = false}
60-
!CHECK: acc.exit_data dataOperands(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) attributes {async}
61-
!CHECK: acc.delete accPtr(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) {asyncOnly = [#acc.device_type<none>], name = "a", structured = false}
59+
!CHECK: %[[DEVPTR:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) async -> !fir.ref<!fir.array<10x10xf32>> {dataClause = #acc<data_clause acc_delete>, name = "a", structured = false}
60+
!CHECK: acc.exit_data async dataOperands(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>)
61+
!CHECK: acc.delete accPtr(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) async {name = "a", structured = false}
6262

6363
!$acc exit data delete(a) wait
6464
!CHECK: %[[DEVPTR:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) -> !fir.ref<!fir.array<10x10xf32>> {dataClause = #acc<data_clause acc_delete>, name = "a", structured = false}
65-
!CHECK: acc.exit_data dataOperands(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) attributes {wait}
65+
!CHECK: acc.exit_data wait dataOperands(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>)
6666
!CHECK: acc.delete accPtr(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) {name = "a", structured = false}
6767

6868
!$acc exit data delete(a) async wait
69-
!CHECK: %[[DEVPTR:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) -> !fir.ref<!fir.array<10x10xf32>> {asyncOnly = [#acc.device_type<none>], dataClause = #acc<data_clause acc_delete>, name = "a", structured = false}
70-
!CHECK: acc.exit_data dataOperands(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) attributes {async, wait}
71-
!CHECK: acc.delete accPtr(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) {asyncOnly = [#acc.device_type<none>], name = "a", structured = false}
69+
!CHECK: %[[DEVPTR:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) async -> !fir.ref<!fir.array<10x10xf32>> {dataClause = #acc<data_clause acc_delete>, name = "a", structured = false}
70+
!CHECK: acc.exit_data async wait dataOperands(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>)
71+
!CHECK: acc.delete accPtr(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) async {name = "a", structured = false}
7272

7373
!$acc exit data delete(a) async(1)
7474
!CHECK: %[[ASYNC1:.*]] = arith.constant 1 : i32

flang/test/Lower/OpenACC/acc-exit-data.f90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,19 @@ subroutine acc_exit_data
5454
!CHECK: acc.detach accPtr(%[[DEVPTR_D]] : !fir.ref<!fir.box<!fir.ptr<f32>>>) {name = "d", structured = false}
5555

5656
!$acc exit data delete(a) async
57-
!CHECK: %[[DEVPTR:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) -> !fir.ref<!fir.array<10x10xf32>> {asyncOnly = [#acc.device_type<none>], dataClause = #acc<data_clause acc_delete>, name = "a", structured = false}
58-
!CHECK: acc.exit_data dataOperands(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) attributes {async}
59-
!CHECK: acc.delete accPtr(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) {asyncOnly = [#acc.device_type<none>], name = "a", structured = false}
57+
!CHECK: %[[DEVPTR:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) async -> !fir.ref<!fir.array<10x10xf32>> {dataClause = #acc<data_clause acc_delete>, name = "a", structured = false}
58+
!CHECK: acc.exit_data async dataOperands(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>)
59+
!CHECK: acc.delete accPtr(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) async {name = "a", structured = false}
6060

6161
!$acc exit data delete(a) wait
6262
!CHECK: %[[DEVPTR:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) -> !fir.ref<!fir.array<10x10xf32>> {dataClause = #acc<data_clause acc_delete>, name = "a", structured = false}
63-
!CHECK: acc.exit_data dataOperands(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) attributes {wait}
63+
!CHECK: acc.exit_data wait dataOperands(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>)
6464
!CHECK: acc.delete accPtr(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) {name = "a", structured = false}
6565

6666
!$acc exit data delete(a) async wait
67-
!CHECK: %[[DEVPTR:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) -> !fir.ref<!fir.array<10x10xf32>> {asyncOnly = [#acc.device_type<none>], dataClause = #acc<data_clause acc_delete>, name = "a", structured = false}
68-
!CHECK: acc.exit_data dataOperands(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) attributes {async, wait}
69-
!CHECK: acc.delete accPtr(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) {asyncOnly = [#acc.device_type<none>], name = "a", structured = false}
67+
!CHECK: %[[DEVPTR:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) async -> !fir.ref<!fir.array<10x10xf32>> {dataClause = #acc<data_clause acc_delete>, name = "a", structured = false}
68+
!CHECK: acc.exit_data async wait dataOperands(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>)
69+
!CHECK: acc.delete accPtr(%[[DEVPTR]] : !fir.ref<!fir.array<10x10xf32>>) async {name = "a", structured = false}
7070

7171
!$acc exit data delete(a) async(1)
7272
!CHECK: %[[ASYNC1:.*]] = arith.constant 1 : i32

flang/test/Lower/OpenACC/acc-kernels-loop.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ subroutine acc_kernels_loop
6969
END DO
7070
!$acc end kernels loop
7171

72-
! CHECK: acc.kernels {{.*}} {
72+
! CHECK: acc.kernels {{.*}} async {
7373
! CHECK: acc.loop {{.*}} {
7474
! CHECK: acc.yield
7575
! CHECK-NEXT: }{{$}}
7676
! CHECK: acc.terminator
77-
! CHECK-NEXT: } attributes {asyncOnly = [#acc.device_type<none>]}
77+
! CHECK-NEXT: }
7878

7979
!$acc kernels loop async(1)
8080
DO i = 1, n

flang/test/Lower/OpenACC/acc-kernels.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ subroutine acc_kernels
3838
!$acc kernels async
3939
!$acc end kernels
4040

41-
! CHECK: acc.kernels {
41+
! CHECK: acc.kernels async {
4242
! CHECK: acc.terminator
43-
! CHECK-NEXT: } attributes {asyncOnly = [#acc.device_type<none>]}
43+
! CHECK-NEXT: }
4444

4545
!$acc kernels async(1)
4646
!$acc end kernels

flang/test/Lower/OpenACC/acc-parallel-loop.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ subroutine acc_parallel_loop
7171
END DO
7272
!$acc end parallel loop
7373

74-
! CHECK: acc.parallel {{.*}} {
74+
! CHECK: acc.parallel {{.*}} async {
7575
! CHECK: acc.loop {{.*}} {
7676
! CHECK: acc.yield
7777
! CHECK-NEXT: }{{$}}
7878
! CHECK: acc.yield
79-
! CHECK-NEXT: } attributes {asyncOnly = [#acc.device_type<none>]}
79+
! CHECK-NEXT: }
8080

8181
!$acc parallel loop async(1)
8282
DO i = 1, n

flang/test/Lower/OpenACC/acc-parallel.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ subroutine acc_parallel
6060
!$acc parallel async
6161
!$acc end parallel
6262

63-
! CHECK: acc.parallel {
63+
! CHECK: acc.parallel async {
6464
! CHECK: acc.yield
65-
! CHECK-NEXT: } attributes {asyncOnly = [#acc.device_type<none>]}
65+
! CHECK-NEXT: }
6666

6767
!$acc parallel async(1)
6868
!$acc end parallel

flang/test/Lower/OpenACC/acc-serial-loop.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ subroutine acc_serial_loop
9090
END DO
9191
!$acc end serial loop
9292

93-
! CHECK: acc.serial {{.*}} {
93+
! CHECK: acc.serial {{.*}} async {
9494
! CHECK: acc.loop {{.*}} {
9595
! CHECK: acc.yield
9696
! CHECK-NEXT: }{{$}}
9797
! CHECK: acc.yield
98-
! CHECK-NEXT: } attributes {asyncOnly = [#acc.device_type<none>]}
98+
! CHECK-NEXT: }
9999

100100
!$acc serial loop async(1)
101101
DO i = 1, n

flang/test/Lower/OpenACC/acc-serial.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ subroutine acc_serial
6060
!$acc serial async
6161
!$acc end serial
6262

63-
! CHECK: acc.serial {
63+
! CHECK: acc.serial async {
6464
! CHECK: acc.yield
65-
! CHECK-NEXT: } attributes {asyncOnly = [#acc.device_type<none>]}
65+
! CHECK-NEXT: }
6666

6767
!$acc serial async(1)
6868
!$acc end serial

flang/test/Lower/OpenACC/acc-update.f90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,19 @@ subroutine acc_update
6363
! CHECK: acc.update_host accPtr(%[[DEVPTR_B]] : !fir.ref<!fir.array<10x10xf32>>) to varPtr(%[[DECLB]]#0 : !fir.ref<!fir.array<10x10xf32>>) {name = "b", structured = false}
6464

6565
!$acc update host(a) async
66-
! CHECK: %[[DEVPTR_A:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) -> !fir.ref<!fir.array<10x10xf32>> {asyncOnly = [#acc.device_type<none>], dataClause = #acc<data_clause acc_update_host>, name = "a", structured = false}
66+
! CHECK: %[[DEVPTR_A:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) async -> !fir.ref<!fir.array<10x10xf32>> {dataClause = #acc<data_clause acc_update_host>, name = "a", structured = false}
6767
! CHECK: acc.update async dataOperands(%[[DEVPTR_A]] : !fir.ref<!fir.array<10x10xf32>>)
68-
! CHECK: acc.update_host accPtr(%[[DEVPTR_A]] : !fir.ref<!fir.array<10x10xf32>>) to varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) {asyncOnly = [#acc.device_type<none>], name = "a", structured = false}
68+
! CHECK: acc.update_host accPtr(%[[DEVPTR_A]] : !fir.ref<!fir.array<10x10xf32>>) async to varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) {name = "a", structured = false}
6969

7070
!$acc update host(a) wait
7171
! CHECK: %[[DEVPTR_A:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) -> !fir.ref<!fir.array<10x10xf32>> {dataClause = #acc<data_clause acc_update_host>, name = "a", structured = false}
7272
! CHECK: acc.update wait dataOperands(%[[DEVPTR_A]] : !fir.ref<!fir.array<10x10xf32>>)
7373
! CHECK: acc.update_host accPtr(%[[DEVPTR_A]] : !fir.ref<!fir.array<10x10xf32>>) to varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) {name = "a", structured = false}
7474

7575
!$acc update host(a) async wait
76-
! CHECK: %[[DEVPTR_A:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) -> !fir.ref<!fir.array<10x10xf32>> {asyncOnly = [#acc.device_type<none>], dataClause = #acc<data_clause acc_update_host>, name = "a", structured = false}
76+
! CHECK: %[[DEVPTR_A:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) async -> !fir.ref<!fir.array<10x10xf32>> {dataClause = #acc<data_clause acc_update_host>, name = "a", structured = false}
7777
! CHECK: acc.update async wait dataOperands(%[[DEVPTR_A]] : !fir.ref<!fir.array<10x10xf32>>)
78-
! CHECK: acc.update_host accPtr(%[[DEVPTR_A]] : !fir.ref<!fir.array<10x10xf32>>) to varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) {asyncOnly = [#acc.device_type<none>], name = "a", structured = false}
78+
! CHECK: acc.update_host accPtr(%[[DEVPTR_A]] : !fir.ref<!fir.array<10x10xf32>>) async to varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) {name = "a", structured = false}
7979

8080
!$acc update host(a) async(1)
8181
! CHECK: [[ASYNC1:%.*]] = arith.constant 1 : i32
@@ -108,8 +108,8 @@ subroutine acc_update
108108
! CHECK: acc.update_host accPtr(%[[DEVPTR_A]] : !fir.ref<!fir.array<10x10xf32>>) to varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) {name = "a", structured = false}
109109

110110
!$acc update host(a) device_type(host, nvidia) async
111-
! CHECK: %[[DEVPTR_A:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) -> !fir.ref<!fir.array<10x10xf32>> {asyncOnly = [#acc.device_type<host>, #acc.device_type<nvidia>], dataClause = #acc<data_clause acc_update_host>, name = "a", structured = false}
111+
! CHECK: %[[DEVPTR_A:.*]] = acc.getdeviceptr varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) async([#acc.device_type<host>, #acc.device_type<nvidia>]) -> !fir.ref<!fir.array<10x10xf32>> {dataClause = #acc<data_clause acc_update_host>, name = "a", structured = false}
112112
! CHECK: acc.update async([#acc.device_type<host>, #acc.device_type<nvidia>]) dataOperands(%[[DEVPTR_A]] : !fir.ref<!fir.array<10x10xf32>>)
113-
! CHECK: acc.update_host accPtr(%[[DEVPTR_A]] : !fir.ref<!fir.array<10x10xf32>>) to varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) {asyncOnly = [#acc.device_type<host>, #acc.device_type<nvidia>], name = "a", structured = false}
113+
! CHECK: acc.update_host accPtr(%[[DEVPTR_A]] : !fir.ref<!fir.array<10x10xf32>>) async([#acc.device_type<host>, #acc.device_type<nvidia>]) to varPtr(%[[DECLA]]#0 : !fir.ref<!fir.array<10x10xf32>>) {name = "a", structured = false}
114114

115115
end subroutine acc_update

flang/test/Lower/OpenACC/acc-wait.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ subroutine acc_update
2525

2626
!$acc wait(1) async
2727
!CHECK: [[WAIT3:%.*]] = arith.constant 1 : i32
28-
!CHECK: acc.wait([[WAIT3]] : i32) attributes {async}
28+
!CHECK: acc.wait([[WAIT3]] : i32) async
2929

3030
!$acc wait(1) async(async)
3131
!CHECK: [[WAIT3:%.*]] = arith.constant 1 : i32

0 commit comments

Comments
 (0)