[flang-commits] [flang] [flang][acc] Fix mappableTy.generateAccBounds to correctly handle dynamic-sized arrays (PR #155666)

via flang-commits flang-commits at lists.llvm.org
Wed Aug 27 19:18:10 PDT 2025


================
@@ -75,4 +75,13 @@ module attributes {dlti.dl_spec = #dlti.dl_spec<f16 = dense<16> : vector<2xi64>,
   // CHECK: Size: 40
   // CHECK: Offset: 0
   // CHECK: Bound[0]: %{{.*}} = acc.bounds lowerbound(%c0{{.*}} : index) upperbound(%{{.*}} : index) extent(%c10{{.*}} : index) stride(%c1{{.*}} : index) startIdx(%c1{{.*}} : index)
+
+  // CHECK: acc.copyin
+  // CHECK: acc.copyin
+  // CHECK: fir.shape_shift %c2, %[[EXTENT:.*]] : (index, index) -> !fir.shapeshift<1>
+  // CHECK: acc.copyin
+  // CHECK: %[[SUBI:.*]] = arith.subi %[[EXTENT]], %c1{{.*}} : index
+  // CHECK: %{{.*}} = acc.bounds lowerbound(%c0{{.*}} : index) upperbound(%[[SUBI]] : index) extent(%{{.*}} : index) stride(%c1{{.*}} : index) startIdx(%c2{{.*}} : index)
----------------
khaki3 wrote:

I've updated test-fir-openacc-interfaces outputs. Thanks for pointing this out.

https://github.com/llvm/llvm-project/pull/155666


More information about the flang-commits mailing list