[flang-commits] [flang] [flang][OpenMP] Implement collapse for imperfectly nested loops (PR #202435)

via flang-commits flang-commits at lists.llvm.org
Tue Jun 23 08:18:20 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- flang/include/flang/Semantics/openmp-utils.h flang/lib/Lower/OpenMP/OpenMP.cpp flang/lib/Lower/OpenMP/Utils.cpp flang/lib/Semantics/check-omp-loop.cpp flang/lib/Semantics/openmp-utils.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/flang/lib/Semantics/openmp-utils.cpp b/flang/lib/Semantics/openmp-utils.cpp
index 76ccb3d92..38318fa20 100644
--- a/flang/lib/Semantics/openmp-utils.cpp
+++ b/flang/lib/Semantics/openmp-utils.cpp
@@ -1237,9 +1237,8 @@ std::pair<WithReason<int64_t>, bool> GetAffectedNestDepthWithReason(
       ocount = std::nullopt;
       oreason = Reason();
     }
-    bool hasOrdered{
-        parser::omp::FindClause(spec, llvm::omp::Clause::OMPC_ordered) !=
-        nullptr};
+    bool hasOrdered{parser::omp::FindClause(
+                        spec, llvm::omp::Clause::OMPC_ordered) != nullptr};
     // Perfect-nesting requirement for the ORDERED clause, by version:
     //
     //   5.0:     Any ORDERED clause makes the associated loops a doacross loop

``````````

</details>


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


More information about the flang-commits mailing list