https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120435

            Bug ID: 120435
           Summary: [New INSN][GCN] Add half-cycle trigonometric INSNs
                    pattern (sinpi, cospi, …)
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: ams at gcc dot gnu.org
  Target Milestone: ---

C23 (and Fortran 2023) added sinpi, cospi, ... half-cycle (180°) trigonometric
functions that take multiple of PI as argument instead of radiant.

GCC supports the associated builtins since r16-710-g591d3d02664c7b.

>From adding INSNs pattern, at least GCN would profit - as it has the following
instructions (in GCN3 and MI300):

* V_COS_F{16,32} - "Cos function. Input must be normalized from radians by
dividing by 2*PI."

* V_SIN_F{16,32} - "Sin function. Input must be normalized from radians by
dividing by 2*PI."

Reply via email to