[llvm] [ValueTracking] Fix bug of using wrong condition for deducing KnownBits (PR #124481)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 26 12:48:49 PST 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 e8e75e08c9214fe25b56535fc26f5435a875a137 4a168168abbbd23299a1ddd043fb3a34cf1fa4fb --extensions cpp -- llvm/lib/Analysis/ValueTracking.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 477b934b12..b63a0a07f7 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -614,7 +614,7 @@ static void breakSelfRecursivePHI(const Use *U, const PHINode *PHI,
// TODO: We could handle any number of incoming edges as long as we only have
// two unique values.
if (auto *IncPhi = dyn_cast<PHINode>(ValOut);
- IncPhi && IncPhi->getNumIncomingValues() == 2) {
+ IncPhi && IncPhi->getNumIncomingValues() == 2) {
for (int Idx = 0; Idx < 2; ++Idx) {
if (IncPhi->getIncomingValue(Idx) == PHI) {
ValOut = IncPhi->getIncomingValue(1 - Idx);
``````````
</details>
https://github.com/llvm/llvm-project/pull/124481
More information about the llvm-commits
mailing list