@@ -178,8 +178,7 @@ subroutine acc_enter_data
178
178
! $acc enter data copyin(a(1:,1:5))
179
179
! CHECK: %[[ONE:.*]] = arith.constant 1 : index
180
180
! CHECK: %[[LB1:.*]] = arith.constant 0 : index
181
- ! CHECK: %[[LBEXT:.*]] = arith.addi %c10{{.*}}, %[[ONE]] : index
182
- ! CHECK: %[[UB1:.*]] = arith.subi %[[LBEXT]], %[[ONE]] : index
181
+ ! CHECK: %[[UB1:.*]] = arith.subi %c10{{.*}}, %[[ONE]] : index
183
182
! CHECK: %[[BOUND1:.*]] = acc.bounds lowerbound(%[[LB1]] : index) upperbound(%[[UB1]] : index) stride(%[[ONE]] : index) startIdx(%c1{{.*}} : index)
184
183
! CHECK: %[[LB2:.*]] = arith.constant 0 : index
185
184
! CHECK: %[[UB2:.*]] = arith.constant 4 : index
@@ -203,11 +202,9 @@ subroutine acc_enter_data
203
202
! $acc enter data copyin(a(:,:))
204
203
! CHECK: %[[LB:.*]] = arith.constant 0 : index
205
204
! CHECK: %[[ONE:.*]] = arith.constant 1 : index
206
- ! CHECK: %[[LBEXT:.*]] = arith.addi %c10{{.*}}, %[[ONE]] : index
207
- ! CHECK: %[[UB:.*]] = arith.subi %[[LBEXT]], %[[ONE]] : index
205
+ ! CHECK: %[[UB:.*]] = arith.subi %c10{{.*}}, %[[ONE]] : index
208
206
! CHECK: %[[BOUND1:.*]] = acc.bounds lowerbound(%[[LB]] : index) upperbound(%[[UB]] : index) stride(%[[ONE]] : index) startIdx(%[[ONE]] : index)
209
- ! CHECK: %[[LBEXT:.*]] = arith.addi %c10{{.*}}, %[[ONE]] : index
210
- ! CHECK: %[[UB:.*]] = arith.subi %[[LBEXT]], %[[ONE]] : index
207
+ ! CHECK: %[[UB:.*]] = arith.subi %{{.*}}, %[[ONE]] : index
211
208
! CHECK: %[[BOUND2:.*]] = acc.bounds lowerbound(%[[LB]] : index) upperbound(%[[UB]] : index) stride(%[[ONE]] : index) startIdx(%[[ONE]] : index)
212
209
! FIR: %[[COPYIN_A:.*]] = acc.copyin varPtr(%[[A]] : !fir.ref<!fir.array<10x10xf32>>) bounds(%[[BOUND1]], %[[BOUND2]]) -> !fir.ref<!fir.array<10x10xf32>> {name = "a(:,:)", structured = false}
213
210
! HLFIR: %[[COPYIN_A:.*]] = acc.copyin varPtr(%[[DECLA]]#1 : !fir.ref<!fir.array<10x10xf32>>) bounds(%[[BOUND1]], %[[BOUND2]]) -> !fir.ref<!fir.array<10x10xf32>> {name = "a(:,:)", structured = false}
@@ -402,8 +399,7 @@ subroutine acc_enter_data_assumed(a, b, n, m)
402
399
! CHECK: %[[C0:.*]] = arith.constant 0 : index
403
400
! FIR: %[[DIMS1:.*]]:3 = fir.box_dims %[[A]], %[[C0]] : (!fir.box<!fir.array<?xf32>>, index) -> (index, index, index)
404
401
! HLFIR: %[[DIMS1:.*]]:3 = fir.box_dims %[[DECLA]]#1, %[[C0]] : (!fir.box<!fir.array<?xf32>>, index) -> (index, index, index)
405
- ! CHECK: %[[LBEXT:.*]] = arith.addi %[[DIMS1]]#1, %[[ONE]] : index
406
- ! CHECK: %[[UB:.*]] = arith.subi %[[LBEXT]], %[[ONE]] : index
402
+ ! CHECK: %[[UB:.*]] = arith.subi %[[DIMS1]]#1, %[[ONE]] : index
407
403
! CHECK: %[[BOUND:.*]] = acc.bounds lowerbound(%[[LB]] : index) upperbound(%[[UB]] : index) stride(%[[DIMS0]]#2 : index) startIdx(%[[ONE]] : index) {strideInBytes = true}
408
404
! FIR: %[[BOX_ADDR:.*]] = fir.box_addr %[[A]] : (!fir.box<!fir.array<?xf32>>) -> !fir.ref<!fir.array<?xf32>>
409
405
! HLFIR: %[[BOX_ADDR:.*]] = fir.box_addr %[[DECLA]]#1 : (!fir.box<!fir.array<?xf32>>) -> !fir.ref<!fir.array<?xf32>>
@@ -419,8 +415,7 @@ subroutine acc_enter_data_assumed(a, b, n, m)
419
415
! CHECK: %[[C0:.*]] = arith.constant 0 : index
420
416
! FIR: %[[DIMS1:.*]]:3 = fir.box_dims %[[A]], %[[C0]] : (!fir.box<!fir.array<?xf32>>, index) -> (index, index, index)
421
417
! HLFIR: %[[DIMS1:.*]]:3 = fir.box_dims %[[DECLA]]#1, %[[C0]] : (!fir.box<!fir.array<?xf32>>, index) -> (index, index, index)
422
- ! CHECK: %[[LBEXT:.*]] = arith.addi %[[DIMS1]]#1, %[[ONE]] : index
423
- ! CHECK: %[[UB:.*]] = arith.subi %[[LBEXT]], %[[ONE]] : index
418
+ ! CHECK: %[[UB:.*]] = arith.subi %[[DIMS1]]#1, %[[ONE]] : index
424
419
! CHECK: %[[BOUND:.*]] = acc.bounds lowerbound(%[[LB]] : index) upperbound(%[[UB]] : index) stride(%[[DIMS0]]#2 : index) startIdx(%[[ONE]] : index) {strideInBytes = true}
425
420
! FIR: %[[BOX_ADDR:.*]] = fir.box_addr %[[A]] : (!fir.box<!fir.array<?xf32>>) -> !fir.ref<!fir.array<?xf32>>
426
421
! HLFIR: %[[BOX_ADDR:.*]] = fir.box_addr %[[DECLA]]#1 : (!fir.box<!fir.array<?xf32>>) -> !fir.ref<!fir.array<?xf32>>
@@ -465,8 +460,7 @@ subroutine acc_enter_data_assumed(a, b, n, m)
465
460
! CHECK: %[[C0:.*]] = arith.constant 0 : index
466
461
! FIR: %[[DIMS:.*]]:3 = fir.box_dims %[[A]], %[[C0]] : (!fir.box<!fir.array<?xf32>>, index) -> (index, index, index)
467
462
! HLFIR: %[[DIMS:.*]]:3 = fir.box_dims %[[DECLA]]#1, %[[C0]] : (!fir.box<!fir.array<?xf32>>, index) -> (index, index, index)
468
- ! CHECK: %[[LBEXT:.*]] = arith.addi %[[DIMS]]#1, %[[ONE]] : index
469
- ! CHECK: %[[UB:.*]] = arith.subi %[[LBEXT]], %[[ONE]] : index
463
+ ! CHECK: %[[UB:.*]] = arith.subi %[[DIMS]]#1, %[[ONE]] : index
470
464
! CHECK: %[[BOUND:.*]] = acc.bounds lowerbound(%[[LB]] : index) upperbound(%[[UB]] : index) stride(%[[DIMS0]]#2 : index) startIdx(%[[ONE]] : index) {strideInBytes = true}
471
465
! FIR: %[[BOX_ADDR:.*]] = fir.box_addr %[[A]] : (!fir.box<!fir.array<?xf32>>) -> !fir.ref<!fir.array<?xf32>>
472
466
! HLFIR: %[[BOX_ADDR:.*]] = fir.box_addr %[[DECLA]]#1 : (!fir.box<!fir.array<?xf32>>) -> !fir.ref<!fir.array<?xf32>>
@@ -720,8 +714,7 @@ subroutine acc_enter_data_derived_type()
720
714
! HLFIR: %[[ARRAY_COORD:.*]] = hlfir.designate %[[DECLA]]#0{"array"} shape %{{.*}} : (!fir.ref<!fir.type<_QFacc_enter_data_derived_typeTdt{data:f32,array:!fir.array<10xf32>}>>, !fir.shape<1>) -> !fir.ref<!fir.array<10xf32>>
721
715
! CHECK: %[[LB:.*]] = arith.constant 0 : index
722
716
! CHECK: %[[C1:.*]] = arith.constant 1 : index
723
- ! CHECK: %[[LBEXT:.*]] = arith.addi %[[C10]], %[[C1]] : index
724
- ! CHECK: %[[UB:.*]] = arith.subi %[[LBEXT]], %[[C1]] : index
717
+ ! CHECK: %[[UB:.*]] = arith.subi %[[C10]], %[[C1]] : index
725
718
! CHECK: %[[BOUND:.*]] = acc.bounds lowerbound(%[[LB]] : index) upperbound(%[[UB]] : index) stride(%[[C1]] : index) startIdx(%[[C1]] : index)
726
719
! CHECK: %[[CREATE:.*]] = acc.create varPtr(%[[ARRAY_COORD]] : !fir.ref<!fir.array<10xf32>>) bounds(%[[BOUND]]) -> !fir.ref<!fir.array<10xf32>> {name = "a%array(:)", structured = false}
727
720
! CHECK: acc.enter_data dataOperands(%[[CREATE]] : !fir.ref<!fir.array<10xf32>>)
@@ -755,8 +748,7 @@ subroutine acc_enter_data_derived_type()
755
748
! HLFIR: %[[ARRAY_COORD:.*]] = hlfir.designate %[[DECLA]]#0{"array"} shape %{{.*}} : (!fir.ref<!fir.type<_QFacc_enter_data_derived_typeTdt{data:f32,array:!fir.array<10xf32>}>>, !fir.shape<1>) -> !fir.ref<!fir.array<10xf32>>
756
749
! CHECK: %[[ONE:.*]] = arith.constant 1 : index
757
750
! CHECK: %[[LB:.*]] = arith.constant 1 : index
758
- ! CHECK: %[[LBEXT:.*]] = arith.addi %[[C10]], %[[ONE]] : index
759
- ! CHECK: %[[UB:.*]] = arith.subi %[[LBEXT]], %[[ONE]] : index
751
+ ! CHECK: %[[UB:.*]] = arith.subi %[[C10]], %[[ONE]] : index
760
752
! CHECK: %[[BOUND:.*]] = acc.bounds lowerbound(%[[LB]] : index) upperbound(%[[UB]] : index) stride(%[[ONE]] : index) startIdx(%[[ONE]] : index)
761
753
! CHECK: %[[CREATE:.*]] = acc.create varPtr(%[[ARRAY_COORD]] : !fir.ref<!fir.array<10xf32>>) bounds(%[[BOUND]]) -> !fir.ref<!fir.array<10xf32>> {name = "a%array(2:)", structured = false}
762
754
! CHECK: acc.enter_data dataOperands(%[[CREATE]] : !fir.ref<!fir.array<10xf32>>)
0 commit comments