git: 1eaec69134ba - stable/13 - Merge commit c97a7675eea4 from llvm git (by Qiu Chaofan):

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Mon, 01 Jan 2024 16:43:02 UTC
The branch stable/13 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=1eaec69134ba3017a78c764aa6cb843d567715d3

commit 1eaec69134ba3017a78c764aa6cb843d567715d3
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-12-29 19:30:45 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-01-01 16:42:09 +0000

    Merge commit c97a7675eea4 from llvm git (by Qiu Chaofan):
    
      [PowerPC] Expand FSINCOS of fp128 (#76494)
    
    This fixes "fatal error: error in backend: Cannot select: 0x6d420285c0:
    f128,f128 = fsincos 0x6d4202b6f0" when compiling s_cpowl.c for
    powerpc64le.
    
    Upstream ticket: https://github.com/llvm/llvm-project/issues/76442
    
    Reported by:    pkubaj
    MFC after:      3 days
    
    (cherry picked from commit 79639686401bedbcbbf04eb71e0acb1cc7dcbbcb)
---
 contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index cf1cdad3fee6..1b9824a7c3d1 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -1169,6 +1169,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
       setTruncStoreAction(MVT::f128, MVT::f32, Expand);
 
       // No implementation for these ops for PowerPC.
+      setOperationAction(ISD::FSINCOS, MVT::f128, Expand);
       setOperationAction(ISD::FSIN, MVT::f128, Expand);
       setOperationAction(ISD::FCOS, MVT::f128, Expand);
       setOperationAction(ISD::FPOW, MVT::f128, Expand);
@@ -1401,6 +1402,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
   setLibcallName(RTLIB::EXP2_F128, "exp2f128");
   setLibcallName(RTLIB::SIN_F128, "sinf128");
   setLibcallName(RTLIB::COS_F128, "cosf128");
+  setLibcallName(RTLIB::SINCOS_F128, "sincosf128");
   setLibcallName(RTLIB::POW_F128, "powf128");
   setLibcallName(RTLIB::FMIN_F128, "fminf128");
   setLibcallName(RTLIB::FMAX_F128, "fmaxf128");