summaryrefslogtreecommitdiff
path: root/flang/test
diff options
context:
space:
mode:
authorValentin Clement <clementval@gmail.com>2023-05-10 08:22:05 -0700
committerValentin Clement <clementval@gmail.com>2023-05-10 08:22:38 -0700
commit63d79eb331d83b1e72554316f4fffb681670242d (patch)
tree5ba2b946c767b6dad492c3d946e6cf5efaa69cf6 /flang/test
parente5532fb4935b91b5e68dac73e639a567df52f473 (diff)
downloadllvm-63d79eb331d83b1e72554316f4fffb681670242d.tar.gz
[flang][openacc] Preserve user order for entry data operand on data construct
The order of operand in clauses that are decomposed was not preserved. This patch change how operands are handled and preserve the user ordering for the entry data operation on the acc.data operation. Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D150213
Diffstat (limited to 'flang/test')
-rw-r--r--flang/test/Lower/OpenACC/acc-data.f906
1 files changed, 6 insertions, 0 deletions
diff --git a/flang/test/Lower/OpenACC/acc-data.f90 b/flang/test/Lower/OpenACC/acc-data.f90
index c8f44affea37..32af8039af7c 100644
--- a/flang/test/Lower/OpenACC/acc-data.f90
+++ b/flang/test/Lower/OpenACC/acc-data.f90
@@ -96,6 +96,12 @@ subroutine acc_data
! CHECK: acc.delete accPtr(%[[CREATE_B]] : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) {dataClause = 7 : i64, name = "b"}
! CHECK: acc.delete accPtr(%[[CREATE_C]] : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) {dataClause = 8 : i64, name = "c"}
+ !$acc data create(c) copy(b) create(a)
+ !$acc end data
+!CHECK: %[[CREATE_C:.*]] = acc.create varPtr(%[[C]] : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) -> !fir.ref<!fir.array<10x10xf32>> {name = "c"}
+!CHECK: %[[COPY_B:.*]] = acc.copyin varPtr(%[[B]] : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) -> !fir.ref<!fir.array<10x10xf32>> {dataClause = 3 : i64, name = "b"}
+!CHECK: %[[CREATE_A:.*]] = acc.create varPtr(%[[A]] : !fir.ref<!fir.array<10x10xf32>>) bounds(%{{.*}}, %{{.*}}) -> !fir.ref<!fir.array<10x10xf32>> {name = "a"}
+!CHECK: acc.data dataOperands(%[[CREATE_C]], %[[COPY_B]], %[[CREATE_A]] : !fir.ref<!fir.array<10x10xf32>>, !fir.ref<!fir.array<10x10xf32>>, !fir.ref<!fir.array<10x10xf32>>) {
!$acc data no_create(a, b) create(zero: c)
!$acc end data