[llvm] [X86] Fold `(icmp ult (add x,-C),2)` -> `(or (icmp eq X,C), (icmp eq X,C+1))` for Vectors (PR #84104)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 18:03:29 PST 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 f51ade25b9205efee09a4915031848cebe772805 7447002806757ad462716b5839afd6164a0d5f16 -- llvm/lib/Target/X86/X86ISelLowering.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 99061c900f..eb00107caf 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -53426,7 +53426,7 @@ static SDValue combineSetCC(SDNode *N, SelectionDAG &DAG,
       !Subtarget.hasAVX512() && LHS.hasOneUse()) {
 
     APInt CmpC;
-      SDValue AddC = LHS.getOperand(1);
+    SDValue AddC = LHS.getOperand(1);
     if (ISD::isConstantSplatVector(RHS.getNode(), CmpC) &&
         DAG.isConstantIntBuildVectorOrConstantInt(AddC)) {
       // See which form we have depending on the constant/condition.

``````````

</details>


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


More information about the llvm-commits mailing list