|
6 | 6 | ! CHECK-LABEL: acc.firstprivate.recipe @firstprivatization_ref_50xf32 : !fir.ref<!fir.array<50xf32>> init {
|
7 | 7 | ! CHECK: ^bb0(%{{.*}}: !fir.ref<!fir.array<50xf32>>):
|
8 | 8 | ! CHECK: %[[ALLOCA:.*]] = fir.alloca !fir.array<50xf32>
|
9 |
| -! FIXME: we need hlfir.declare here to satisfy the assumptions about |
10 |
| -! the HLFIR lowering, i.e. that every varible has fir/hlfir.declare. |
11 |
| -! CHECK: acc.yield %[[ALLOCA]] : !fir.ref<!fir.array<50xf32>> |
| 9 | +! HLFIR: %[[SHAPE:.*]] = fir.shape %{{.*}} : (index) -> !fir.shape<1> |
| 10 | +! HLFIR: %[[DECLARE:.*]]:2 = hlfir.declare %[[ALLOCA]](%[[SHAPE]]) {uniq_name = "acc.private.init"} : (!fir.ref<!fir.array<50xf32>>, !fir.shape<1>) -> (!fir.ref<!fir.array<50xf32>>, !fir.ref<!fir.array<50xf32>>) |
| 11 | +! HLFIR: acc.yield %[[DECLARE]]#0 : !fir.ref<!fir.array<50xf32>> |
12 | 12 | ! CHECK: } copy {
|
13 | 13 | ! CHECK: ^bb0(%[[SRC:.*]]: !fir.ref<!fir.array<50xf32>>, %[[DST:.*]]: !fir.ref<!fir.array<50xf32>>):
|
14 | 14 | ! CHECK: %[[LB0:.*]] = arith.constant 0 : index
|
|
26 | 26 | ! CHECK-LABEL: acc.firstprivate.recipe @firstprivatization_ref_100xf32 : !fir.ref<!fir.array<100xf32>> init {
|
27 | 27 | ! CHECK: ^bb0(%{{.*}}: !fir.ref<!fir.array<100xf32>>):
|
28 | 28 | ! CHECK: %[[ALLOCA:.*]] = fir.alloca !fir.array<100xf32>
|
29 |
| -! CHECK: acc.yield %[[ALLOCA]] : !fir.ref<!fir.array<100xf32>> |
| 29 | +! HLFIR: %[[SHAPE:.*]] = fir.shape %{{.*}} : (index) -> !fir.shape<1> |
| 30 | +! HLFIR: %[[DECLARE:.*]]:2 = hlfir.declare %[[ALLOCA]](%[[SHAPE]]) {uniq_name = "acc.private.init"} : (!fir.ref<!fir.array<100xf32>>, !fir.shape<1>) -> (!fir.ref<!fir.array<100xf32>>, !fir.ref<!fir.array<100xf32>>) |
| 31 | +! HLFIR: acc.yield %[[DECLARE]]#0 : !fir.ref<!fir.array<100xf32>> |
30 | 32 | ! CHECK: } copy {
|
31 | 33 | ! CHECK: ^bb0(%[[SRC:.*]]: !fir.ref<!fir.array<100xf32>>, %[[DST:.*]]: !fir.ref<!fir.array<100xf32>>):
|
32 | 34 | ! CHECK: %[[LB0:.*]] = arith.constant 0 : index
|
|
43 | 45 |
|
44 | 46 | ! CHECK-LABEL: acc.firstprivate.recipe @firstprivatization_ref_i32 : !fir.ref<i32> init {
|
45 | 47 | ! CHECK: ^bb0(%{{.*}}: !fir.ref<i32>):
|
46 |
| -! CHECK: %[[ALLOCA:.*]] = fir.alloca i32 |
47 |
| -! CHECK: acc.yield %[[ALLOCA]] : !fir.ref<i32> |
| 48 | +! CHECK: %[[ALLOCA:.*]] = fir.alloca i32 |
| 49 | +! HLFIR: %[[DECLARE:.*]]:2 = hlfir.declare %[[ALLOCA]] {uniq_name = "acc.private.init"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>) |
| 50 | +! HLFIR: acc.yield %[[DECLARE]]#0 : !fir.ref<i32> |
48 | 51 | ! CHECK: } copy {
|
49 | 52 | ! CHECK: ^bb0(%[[SRC:.*]]: !fir.ref<i32>, %[[DST:.*]]: !fir.ref<i32>):
|
50 | 53 | ! CHECK: %[[VALUE:.*]] = fir.load %[[SRC]] : !fir.ref<i32>
|
|
54 | 57 |
|
55 | 58 | ! CHECK-LABEL: acc.private.recipe @privatization_ref_50xf32 : !fir.ref<!fir.array<50xf32>> init {
|
56 | 59 | ! CHECK: ^bb0(%{{.*}}: !fir.ref<!fir.array<50xf32>>):
|
57 |
| -! CHECK: %[[ALLOCA:.*]] = fir.alloca !fir.array<50xf32> |
58 |
| -! CHECK: acc.yield %[[ALLOCA]] : !fir.ref<!fir.array<50xf32>> |
| 60 | +! CHECK: %[[ALLOCA:.*]] = fir.alloca !fir.array<50xf32> |
| 61 | +! HLFIR: %[[SHAPE:.*]] = fir.shape %{{.*}} : (index) -> !fir.shape<1> |
| 62 | +! HLFIR: %[[DECLARE:.*]]:2 = hlfir.declare %[[ALLOCA]](%[[SHAPE]]) {uniq_name = "acc.private.init"} : (!fir.ref<!fir.array<50xf32>>, !fir.shape<1>) -> (!fir.ref<!fir.array<50xf32>>, !fir.ref<!fir.array<50xf32>>) |
| 63 | +! HLFIR: acc.yield %[[DECLARE]]#0 : !fir.ref<!fir.array<50xf32>> |
59 | 64 | ! CHECK: }
|
60 | 65 |
|
61 | 66 | ! CHECK-LABEL: acc.private.recipe @privatization_ref_100xf32 : !fir.ref<!fir.array<100xf32>> init {
|
62 | 67 | ! CHECK: ^bb0(%{{.*}}: !fir.ref<!fir.array<100xf32>>):
|
63 | 68 | ! CHECK: %[[ALLOCA:.*]] = fir.alloca !fir.array<100xf32>
|
64 |
| -! CHECK: acc.yield %[[ALLOCA]] : !fir.ref<!fir.array<100xf32>> |
| 69 | +! HLFIR: %[[SHAPE:.*]] = fir.shape %{{.*}} : (index) -> !fir.shape<1> |
| 70 | +! HLFIR: %[[DECLARE:.*]]:2 = hlfir.declare %[[ALLOCA]](%[[SHAPE]]) {uniq_name = "acc.private.init"} : (!fir.ref<!fir.array<100xf32>>, !fir.shape<1>) -> (!fir.ref<!fir.array<100xf32>>, !fir.ref<!fir.array<100xf32>>) |
| 71 | +! HLFIR: acc.yield %[[DECLARE]]#0 : !fir.ref<!fir.array<100xf32>> |
65 | 72 | ! CHECK: }
|
66 | 73 |
|
67 | 74 | ! CHECK-LABEL: acc.private.recipe @privatization_ref_i32 : !fir.ref<i32> init {
|
68 | 75 | ! CHECK: ^bb0(%{{.*}}: !fir.ref<i32>):
|
69 | 76 | ! CHECK: %[[ALLOCA:.*]] = fir.alloca i32
|
70 |
| -! CHECK: acc.yield %[[ALLOCA]] : !fir.ref<i32> |
| 77 | +! HLFIR: %[[DECLARE:.*]]:2 = hlfir.declare %[[ALLOCA]] {uniq_name = "acc.private.init"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>) |
| 78 | +! HLFIR: acc.yield %[[DECLARE]]#0 : !fir.ref<i32> |
71 | 79 | ! CHECK: }
|
72 | 80 |
|
73 | 81 | program acc_private
|
|
0 commit comments