[clang] [OpenMP] Fix calculation of dependencies for multi-dimensional iteration space (PR #99347)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 17 09:21:00 PDT 2024


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 77b2c681677db02552475426f0f7cf2c009ff98d 655acc619286dba497aab3b59a3b189f47f83237 --extensions c,cpp -- clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/test/OpenMP/depend_iterator_bug.c clang/test/OpenMP/task_codegen.c
``````````

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index a3ade3780b..a6a87ec88e 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -4266,9 +4266,9 @@ std::pair<llvm::Value *, Address> CGOpenMPRuntime::emitDependClause(
         Sz = CGF.Builder.CreateIntCast(Sz, CGF.IntPtrTy, /*isSigned=*/false);
         ClauseIteratorSpace = CGF.Builder.CreateNUWMul(Sz, ClauseIteratorSpace);
       }
-      llvm::Value *NumClauseDeps =
-          CGF.Builder.CreateNUWMul(ClauseIteratorSpace, 
-              llvm::ConstantInt::get(CGF.IntPtrTy, D.DepExprs.size()));
+      llvm::Value *NumClauseDeps = CGF.Builder.CreateNUWMul(
+          ClauseIteratorSpace,
+          llvm::ConstantInt::get(CGF.IntPtrTy, D.DepExprs.size()));
       NumOfRegularWithIterators =
           CGF.Builder.CreateNUWAdd(NumOfRegularWithIterators, NumClauseDeps);
       HasRegularWithIterators = true;

``````````

</details>


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


More information about the cfe-commits mailing list