[llvm] Lower UCMP and SCMP directly to setb instead of matching the dag shape (PR #206282)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 27 13:00:35 PDT 2026


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 cpp -- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp llvm/lib/Target/PowerPC/PPCISelLowering.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/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index e55fa93af..3dc4b5342 100644
--- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -4692,7 +4692,6 @@ void PPCDAGToDAGISel::transferMemOperands(SDNode *N, SDNode *Result) {
   CurDAG->setNodeMemRefs(cast<MachineSDNode>(Result), {MemOp});
 }
 
-
 // Return true if it's a software square-root/divide operand.
 static bool isSWTestOp(SDValue N) {
   if (N.getOpcode() == PPCISD::FTSQRT)
@@ -5737,7 +5736,6 @@ void PPCDAGToDAGISel::Select(SDNode *N) {
     if (Subtarget->useCRBits() && N->getOperand(0).getValueType() == MVT::i1)
       break;
 
-
     // Handle the setcc cases here.  select_cc lhs, 0, 1, 0, cc
     if (!isPPC64 && isNullConstant(N->getOperand(1)) &&
         isOneConstant(N->getOperand(2)) && isNullConstant(N->getOperand(3)) &&

``````````

</details>


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


More information about the llvm-commits mailing list