[llvm] [SelectionDAG] Allow lowering CTPOP into a libcall (PR #99752)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 20 03:19:05 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 b4f3a9662d308c869ac97e4f147edb38bc4f0626 e5b59796e4d726ba6cc29ca152a3965491365e7d --extensions cpp -- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index c0141cfc53..bfae5671d8 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -4981,18 +4981,14 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode *Node) {
   case ISD::CTLZ_ZERO_UNDEF:
     Results.push_back(ExpandIntLibCall(Node, /*IsSigned=*/false,
                                        RTLIB::UNKNOWN_LIBCALL,
-                                       RTLIB::UNKNOWN_LIBCALL,
-                                       RTLIB::CTLZ_I32,
-                                       RTLIB::CTLZ_I64,
-                                       RTLIB::CTLZ_I128));
+                                       RTLIB::UNKNOWN_LIBCALL, RTLIB::CTLZ_I32,
+                                       RTLIB::CTLZ_I64, RTLIB::CTLZ_I128));
     break;
   case ISD::CTPOP:
     Results.push_back(ExpandIntLibCall(Node, /*IsSigned=*/false,
                                        RTLIB::UNKNOWN_LIBCALL,
-                                       RTLIB::UNKNOWN_LIBCALL,
-                                       RTLIB::CTPOP_I32,
-                                       RTLIB::CTPOP_I64,
-                                       RTLIB::CTPOP_I128));
+                                       RTLIB::UNKNOWN_LIBCALL, RTLIB::CTPOP_I32,
+                                       RTLIB::CTPOP_I64, RTLIB::CTPOP_I128));
     break;
   case ISD::RESET_FPENV: {
     // It is legalized to call 'fesetenv(FE_DFL_ENV)'. On most targets

``````````

</details>


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


More information about the llvm-commits mailing list