[llvm] [ValueTracking] Analyze `Select` in `isKnownNonEqual`. (PR #68427)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 9 09:36:27 PDT 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 e85cdb94cc1f1cf3f61de65ae9f72348d0d52b80 604c83acd0e330a6f7bcf81504cc73da7962d12b -- 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 766374a8b..48e88d7cc 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -3122,8 +3122,10 @@ static bool isNonEqualSelect(const Value *V1, const Value *V2, unsigned Depth,
const Value *Cond1 = SI1->getCondition();
const Value *Cond2 = SI2->getCondition();
if (Cond1 == Cond2)
- return isKnownNonEqual(SI1->getTrueValue(), SI2->getTrueValue(), Depth + 1, Q) &&
- isKnownNonEqual(SI1->getFalseValue(), SI2->getFalseValue(), Depth + 1, Q);
+ return isKnownNonEqual(SI1->getTrueValue(), SI2->getTrueValue(),
+ Depth + 1, Q) &&
+ isKnownNonEqual(SI1->getFalseValue(), SI2->getFalseValue(),
+ Depth + 1, Q);
}
return isKnownNonEqual(SI1->getTrueValue(), V2, Depth + 1, Q) &&
isKnownNonEqual(SI1->getFalseValue(), V2, Depth + 1, Q);
``````````
</details>
https://github.com/llvm/llvm-project/pull/68427
More information about the llvm-commits
mailing list