]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PATCH] gcc: add trigonometric pi-based functions as gcc builtins
authorYuao Ma <c8ef@outlook.com>
Sat, 17 May 2025 13:45:49 +0000 (07:45 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Sat, 17 May 2025 13:45:49 +0000 (07:45 -0600)
commit89935d56f768b4cdb767aae8de33f39f9b846a10
tree5ca174b2aa2e4f2f77a323cb2223b48a43c3ac6f
parent591d3d02664c7b27679318de1273b09c061283bc
[PATCH] gcc: add trigonometric pi-based functions as gcc builtins

I committed the wrong version on Yuao's behalf.  This followup adds the
documentation changes -- Jeff.

This patch adds trigonometric pi-based functions as gcc builtins: acospi, asinpi, atan2pi,
atanpi, cospi, sinpi, and tanpi. Latest glibc already provides support for
these functions, which we plan to leverage in future gfortran implementations.

The patch includes two test cases to verify both correct code generation and
function definition.

If approved, I suggest committing this foundational change first. Constant
folding for these builtins will be addressed in subsequent patches.

Best regards,
Yuao

From 9a9683d250078ce1bc687797c26ca05a9e91b350 Mon Sep 17 00:00:00 2001
From: Yuao Ma <c8ef@outlook.com>
Date: Wed, 14 May 2025 22:14:00 +0800
Subject: [PATCH] gcc: add trigonometric pi-based functions as gcc builtins

Add trigonometric pi-based functions as GCC builtins: acospi, asinpi, atan2pi,
atanpi, cospi, sinpi, and tanpi. Latest glibc already provides support for
these functions, which we plan to leverage in future gfortran implementations.

The patch includes two test cases to verify both correct code generation and
function definition.

If approved, I suggest committing this foundational change first. Constant
folding for these builtins will be addressed in subsequent patches.

gcc/ChangeLog:

* doc/extend.texi: Mention new builtins.
gcc/doc/extend.texi