[llvm] [IR] Add `llvm.sincos` intrinsic (PR #109825)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 28 08:02:21 PDT 2024
================
@@ -2899,6 +2943,18 @@ SDValue DAGTypeLegalizer::PromoteFloatRes_FFREXP(SDNode *N) {
return Res;
}
+SDValue DAGTypeLegalizer::PromoteFloatRes_FSINCOS(SDNode *N) {
+ EVT VT = N->getValueType(0);
+ EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), VT);
+ SDValue Op = GetPromotedFloat(N->getOperand(0));
+ SDValue Res = DAG.getNode(N->getOpcode(), SDLoc(N), {NVT, NVT}, Op);
+
+ for (unsigned ResNum = 0; ResNum < N->getNumValues(); ResNum++)
----------------
RKSimon wrote:
(style) `for (unsigned ResNum = 0, NumValues = N->getNumValues(); ResNum < NumValues; ++ResNum)`
https://github.com/llvm/llvm-project/pull/109825
More information about the llvm-commits
mailing list