[llvm] MemoryDependenceAnalysis: Consider a pointer clobbered if it is saved (PR #142096)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 30 00:13:53 PDT 2025


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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
index 00f36b9e0..a907e22ba 100644
--- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -564,8 +564,8 @@ MemDepResult MemoryDependenceResults::getSimplePointerDependencyFrom(
         if (!QueryInst || QueryInst->isVolatile())
           return MemDepResult::getClobber(SI);
 
-      // If we store the pointer of QueryInst, it is danger due to that the address
-      // may be modified with other reference.
+      // If we store the pointer of QueryInst, it is danger due to that the
+      // address may be modified with other reference.
       if (QueryInst && QueryInst->getOperand(0) == SI->getOperand(0))
         return MemDepResult::getClobber(SI);
 

``````````

</details>


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


More information about the llvm-commits mailing list