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

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 07:52:53 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();
----------------
MacDue wrote:

Yes, it should unroll of possible (which is does for `<3 x float>`). There are some cases where it does not unroll right now, but probably should, but that's a general limitation of the "should unroll" check. 

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


More information about the llvm-commits mailing list