[Mlir-commits] [flang] [mlir] [mlir][flang][OpenMP] Select iterators per locator and allow multi-block regions (PR #227454)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Oct 11 20:08:24 PDT 2026


================
@@ -6038,6 +6048,15 @@ void OmpStructureChecker::CheckArraySection(
     for (const auto &subscript : arrayElement.Subscripts()) {
       if (const auto *triplet{
               std::get_if<parser::SubscriptTriplet>(&subscript.u)}) {
+        // OpenMP 5.2 3.2.5 allows a stride only in clauses that permit one.
+        // TODO: Also reject strides in DEPEND and REDUCTION, not just AFFINITY.
+        bool affinityStride{clause == llvm::omp::Clause::OMPC_affinity &&
----------------
MattPD wrote:

Confirmed: Earlier-part strides are rejected in both AFFINITY and DEPEND, while sections inside scalar subscript expressions remain accepted.

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


More information about the Mlir-commits mailing list