[llvm] [SDAG] Use shifts if ISD::MUL is illegal when lowering ISD::CTPOP (PR #86505)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 06:53:33 PDT 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 e6f63a942a45e3545332cd9a43982a69a4d5667b cc6f8c358dcfa8fc7f3e55ad8a704e676145382c -- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index e0662d57bb..e1dd51f03a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -8723,8 +8723,7 @@ SDValue TargetLowering::expandCTPOP(SDNode *Node, SelectionDAG &DAG) const {
DAG.getNode(ISD::SHL, dl, VT, V, ShiftC));
}
}
- return DAG.getNode(ISD::SRL, dl, VT, V,
- DAG.getConstant(Len - 8, dl, ShVT));
+ return DAG.getNode(ISD::SRL, dl, VT, V, DAG.getConstant(Len - 8, dl, ShVT));
}
SDValue TargetLowering::expandVPCTPOP(SDNode *Node, SelectionDAG &DAG) const {
``````````
</details>
https://github.com/llvm/llvm-project/pull/86505
More information about the llvm-commits
mailing list