[llvm] [CaptureTracking] Do not capture compares of same object (PR #74228)

via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 2 23:24:57 PST 2023


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 6b6552aa92a56e4132a62edf31c91ad77caad49f ca898a1fd6a518fc7c0c864738d7b2f6b869f394 -- llvm/include/llvm/Analysis/ValueTracking.h llvm/lib/Analysis/CaptureTracking.cpp llvm/lib/Analysis/ValueTracking.cpp llvm/unittests/Analysis/CaptureTrackingTest.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 3dd035ac49..80e9b54d3d 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -5968,7 +5968,8 @@ static bool isSameUnderlyingObjectInLoop(const PHINode *PN,
   return true;
 }
 
-const Value *llvm::getUnderlyingObjectLookThrough(const Value *V, unsigned MaxLookup) {
+const Value *llvm::getUnderlyingObjectLookThrough(const Value *V,
+                                                  unsigned MaxLookup) {
   V = getUnderlyingObject(V, MaxLookup);
 
   const PHINode *PN = dyn_cast<PHINode>(V);

``````````

</details>


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


More information about the llvm-commits mailing list