[llvm] [InstCombine] Fold `(icmp eq/ne (or (select cond, 0/NZ, 0/NZ), X), 0)` (PR #88183)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 13:01:35 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 7599d478efb1576b5013d17a70971f76d6f7c25a a18df9ab528a62b94f13d88e112f00a0dd3675fa -- llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index c6949ff744..205d2a6a0c 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -3535,7 +3535,7 @@ Instruction *InstCombinerImpl::foldICmpBinOpEqualityWithConstant(
           NotCond = getFreelyInverted(Cond, InvertAll, &Builder);
           if (NotCond && InvertAll) {
             freelyInvertAllUsersOf(Ins, /*IgnoredUser=*/nullptr);
-            replaceInstUsesWith(*Ins, NotCond);            
+            replaceInstUsesWith(*Ins, NotCond);
           }
         }
         if (NotCond) {

``````````

</details>


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


More information about the llvm-commits mailing list