diff options
author | Benjamin Maxwell <benjamin.maxwell@arm.com> | 2024-11-06 11:06:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-06 11:06:06 +0000 |
commit | ea6b8fa4b9b48a11c2657bedf35ad5291b1e2b9c (patch) | |
tree | 9e9d26639d60a5adcf2ad756deaafeb0f37d444d /llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | |
parent | 40556d08491f530e03746fb188b38e7f9cb272c7 (diff) | |
download | llvm-ea6b8fa4b9b48a11c2657bedf35ad5291b1e2b9c.zip llvm-ea6b8fa4b9b48a11c2657bedf35ad5291b1e2b9c.tar.gz llvm-ea6b8fa4b9b48a11c2657bedf35ad5291b1e2b9c.tar.bz2 |
[SDAG] Merge multiple-result libcall expansion into DAG.expandMultipleResultFPLibCall() (#114792)
This merges the logic for expanding both FFREXP and FSINCOS into one
method `DAG.expandMultipleResultFPLibCall()`. This reduces duplication
and also allows FFREXP to benefit from the stack slot elimination
implemented for FSINCOS. This method will also be used in future to
implement more multiple-result intrinsics (such as modf and sincospi).
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp index 8403c98..db21e70 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp @@ -1192,11 +1192,13 @@ void VectorLegalizer::Expand(SDNode *Node, SmallVectorImpl<SDValue> &Results) { return; break; - case ISD::FSINCOS: - if (DAG.expandFSINCOS(Node, Results)) + case ISD::FSINCOS: { + RTLIB::Libcall LC = + RTLIB::getFSINCOS(Node->getValueType(0).getVectorElementType()); + if (DAG.expandMultipleResultFPLibCall(LC, Node, Results)) return; - break; + } case ISD::VECTOR_COMPRESS: Results.push_back(TLI.expandVECTOR_COMPRESS(Node, DAG)); return; |