[llvm] [IR] Add `llvm.sincos` intrinsic (PR #109825)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 04:12:19 PDT 2024


================
@@ -4749,6 +4755,14 @@ void DAGTypeLegalizer::WidenVectorResult(SDNode *N, unsigned ResNo) {
   case ISD::VP_FSHR:
     Res = WidenVecRes_Ternary(N);
     break;
+  case ISD::FSINCOS: {
+    if (!unrollExpandedOp())
+      Res = WidenVecRes_FSINCOS(N);
+    for (unsigned ResNum = 0; ResNum < N->getNumValues(); ResNum++)
+      SetWidenedVector(SDValue(N, ResNum), Res.getValue(ResNum));
+    Res = SDValue();
----------------
sdesmalen-arm wrote:

Is it worth creating a `WidenVecRes_UnaryOpWithTwoResults` for this? (it seems FREXPR is missing in this switch statement)

Also, should it only do the widening of the results when it's _not_ unrolling the expanded op? (all tests still pass when I make that modification)

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


More information about the llvm-commits mailing list