[llvm] [SDAG] Merge multiple-result libcall expansion into DAG.expandMultipleResultFPLibCall() (PR #114792)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 04:33:10 PST 2024


================
@@ -4562,10 +4520,11 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode *Node) {
     ExpandFPLibCall(Node, RTLIB::TANH_F32, RTLIB::TANH_F64, RTLIB::TANH_F80,
                     RTLIB::TANH_F128, RTLIB::TANH_PPCF128, Results);
     break;
-  case ISD::FSINCOS:
-    // Expand into sincos libcall.
-    (void)DAG.expandFSINCOS(Node, Results);
+  case ISD::FSINCOS: {
+    RTLIB::Libcall LC = RTLIB::getFSINCOS(Node->getValueType(0));
+    DAG.expandMultipleResultFPLibCall(LC, Node, Results);
----------------
sdesmalen-arm wrote:

Will this throw a 'unused result' warning now? What happens if the result value was `false` ?

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


More information about the llvm-commits mailing list