[llvm] [DAG]: Created method `m_SelectLike` to match `ISD::Select` and `ISD::VSelect` (PR #164069)

via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 18 07:28:13 PDT 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 origin/main HEAD --extensions h,cpp -- llvm/include/llvm/CodeGen/SDPatternMatch.h llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index c445a40ed..beffa04d4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -13858,8 +13858,7 @@ static SDValue tryToFoldExtendSelectLoad(SDNode *N, const TargetLowering &TLI,
          "Expected EXTEND dag node in input!");
 
   SDValue Cond, Op1, Op2;
-  if (!sd_match(N0,
-                m_SelectLike(m_Value(Cond), m_Value(Op1), m_Value(Op2))) ||
+  if (!sd_match(N0, m_SelectLike(m_Value(Cond), m_Value(Op1), m_Value(Op2))) ||
       !N0->hasOneUse()) {
     return SDValue();
   }

``````````

</details>


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


More information about the llvm-commits mailing list