[llvm] Reland [InstCombine] Teach foldSelectOpOp about samesign (PR #124320)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 24 10:15:02 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 a976036a100b7dd459b6cabac96159875fcd513d 47843304a45e513701fa51aa641c97b036dbde0b --extensions cpp -- llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
index 6357824077..4c78c0e74d 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
@@ -431,8 +431,8 @@ Instruction *InstCombinerImpl::foldSelectOpOp(SelectInst &SI, Instruction *TI,
       auto P = CmpPredicate::getMatching(TPred, FPred);
       bool Swapped = !P;
       if (Swapped)
-        P = CmpPredicate::getMatching(
-            TPred, ICmpInst::getSwappedCmpPredicate(FPred));
+        P = CmpPredicate::getMatching(TPred,
+                                      ICmpInst::getSwappedCmpPredicate(FPred));
       if (P) {
         if (Value *MatchOp =
                 getCommonOp(TI, FI, ICmpInst::isEquality(*P), Swapped)) {

``````````

</details>


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


More information about the llvm-commits mailing list