aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
diff options
context:
space:
mode:
authorBenjamin Maxwell <benjamin.maxwell@arm.com>2024-10-31 12:41:43 +0000
committerGitHub <noreply@github.com>2024-10-31 12:41:43 +0000
commit89a8c71db61282c4e7522ffda5dbee890900dca5 (patch)
treec5b3c92c1f1978ea939cd179684f915763e85455 /llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
parent3f17613509167e9e0e1502b162524b7f484b39aa (diff)
downloadllvm-89a8c71db61282c4e7522ffda5dbee890900dca5.zip
llvm-89a8c71db61282c4e7522ffda5dbee890900dca5.tar.gz
llvm-89a8c71db61282c4e7522ffda5dbee890900dca5.tar.bz2
[SDAG] Support expanding `FSINCOS` to vector library calls (#114039)
This shares most of its code with the scalar sincos expansion. It allows expanding vector FSINCOS nodes to a library call from the specified `-vector-library`. The upside of this is it will mean the vectorizer only needs to handle the sincos intrinsic, which has no memory effects, and this can handle lowering the intrinsic to a call that takes output pointers.
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
index a8a171d..8403c98 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
@@ -1192,6 +1192,11 @@ void VectorLegalizer::Expand(SDNode *Node, SmallVectorImpl<SDValue> &Results) {
return;
break;
+ case ISD::FSINCOS:
+ if (DAG.expandFSINCOS(Node, Results))
+ return;
+
+ break;
case ISD::VECTOR_COMPRESS:
Results.push_back(TLI.expandVECTOR_COMPRESS(Node, DAG));
return;