[flang-commits] [flang] [flang][acc] Fix mappableTy.generateAccBounds to correctly handle dynamic-sized arrays (PR #155666)
Razvan Lupusoru via flang-commits
flang-commits at lists.llvm.org
Wed Aug 27 17:57: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)
----------------
razvanlupusoru wrote:
The rest of this test does not check the IR but instead checks the output of the pass `test-fir-openacc-interfaces`. Would you mind keeping the testing consistent with that?
https://github.com/llvm/llvm-project/pull/155666
More information about the flang-commits
mailing list