[llvm] fimxe (PR #147814)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 9 12:57:04 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 HEAD~1 HEAD --extensions cpp -- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
``````````
</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 1895614b9..6f3b46e64 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -2527,7 +2527,8 @@ SDValue DAGCombiner::foldBinOpIntoSelect(SDNode *BO) {
unsigned SelOpNo = 0;
SDValue Sel = BO->getOperand(0);
auto BinOpcode = BO->getOpcode();
- if ((Sel.getOpcode() != ISD::SELECT && Sel.getOpcode() != ISD::SELECT_CC) || !Sel.hasOneUse()) {
+ if ((Sel.getOpcode() != ISD::SELECT && Sel.getOpcode() != ISD::SELECT_CC) ||
+ !Sel.hasOneUse()) {
SelOpNo = 1;
Sel = BO->getOperand(1);
@@ -2543,7 +2544,8 @@ SDValue DAGCombiner::foldBinOpIntoSelect(SDNode *BO) {
}
}
- if ((Sel.getOpcode() != ISD::SELECT && Sel.getOpcode() != ISD::SELECT_CC) || !Sel.hasOneUse())
+ if ((Sel.getOpcode() != ISD::SELECT && Sel.getOpcode() != ISD::SELECT_CC) ||
+ !Sel.hasOneUse())
return SDValue();
// Extract true value and false value from SELECT or SELECT_CC
@@ -2617,12 +2619,12 @@ SDValue DAGCombiner::foldBinOpIntoSelect(SDNode *BO) {
SDValue SelectOp;
if (IsSelectCC) {
// Preserve SELECT_CC form
- SelectOp = DAG.getNode(ISD::SELECT_CC, DL, VT,
- Sel.getOperand(0), Sel.getOperand(1), // LHS, RHS
- NewCT, NewCF,
+ SelectOp = DAG.getNode(ISD::SELECT_CC, DL, VT, Sel.getOperand(0),
+ Sel.getOperand(1), // LHS, RHS
+ NewCT, NewCF,
Sel.getOperand(4)); // CC
} else {
- // Use SELECT form
+ // Use SELECT form
SelectOp = DAG.getSelect(DL, VT, Sel.getOperand(0), NewCT, NewCF);
}
SelectOp->setFlags(BO->getFlags());
``````````
</details>
https://github.com/llvm/llvm-project/pull/147814
More information about the llvm-commits
mailing list