[PATCH] testsuite: require c99 runtime for trigonometric optimisation tests

Richard Sandiford richard.sandiford@arm.com
Wed Aug 19 09:06:04 GMT 2020


Pat Bernardi <bernardi@adacore.com> writes:
> A number of optimisation that simplify trigonometric expressions are only
> performed when the compiler knows the target has a C99 libm available.
> Since targets like *-elf may not have such a libm, a C99 runtime requirement
> is added to these tests.
>
> Tested on x86-elf and x86_64-elf hosted on x86_64-linux in addition to x86_64-pc-linux-gnu
>
> If approved, I'll need a maintainer to kindly commit on my behalf.
>
> Thanks,
>
> Pat Bernardi
> Senior Software Engineer, AdaCore
>
> 2020-08-18  Pat Bernardi  <bernardi@adacore.com>
>
> gcc/testsuite/ChangeLog
>
> 	* gcc.dg/sinatan-2.c: Add dg-require-effective-target c99_runtime.
> 	* gcc.dg/sinhovercosh-1.c: Likewise.
> 	* gcc.dg/tanhbysinh.c: Likewise.

Thanks, pushed to master.

Richard

> ---
>  gcc/testsuite/gcc.dg/sinatan-2.c      | 1 +
>  gcc/testsuite/gcc.dg/sinhovercosh-1.c | 1 +
>  gcc/testsuite/gcc.dg/tanhbysinh.c     | 3 ++-
>  3 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.dg/sinatan-2.c b/gcc/testsuite/gcc.dg/sinatan-2.c
> index 8e7ea3c90fc..64d6d301535 100644
> --- a/gcc/testsuite/gcc.dg/sinatan-2.c
> +++ b/gcc/testsuite/gcc.dg/sinatan-2.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-options "-Ofast -fdump-tree-optimized" } */
> +/* { dg-require-effective-target c99_runtime } */
>  
>  extern float sinf (float);
>  extern float cosf (float);
> diff --git a/gcc/testsuite/gcc.dg/sinhovercosh-1.c b/gcc/testsuite/gcc.dg/sinhovercosh-1.c
> index d41093fa6de..564d3c51b3e 100644
> --- a/gcc/testsuite/gcc.dg/sinhovercosh-1.c
> +++ b/gcc/testsuite/gcc.dg/sinhovercosh-1.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-options "-Ofast -fdump-tree-optimized" } */
> +/* { dg-require-effective-target c99_runtime } */
>  
>  extern float sinhf (float);
>  extern float coshf (float);
> diff --git a/gcc/testsuite/gcc.dg/tanhbysinh.c b/gcc/testsuite/gcc.dg/tanhbysinh.c
> index fde72c2f93b..9dbe133ec74 100644
> --- a/gcc/testsuite/gcc.dg/tanhbysinh.c
> +++ b/gcc/testsuite/gcc.dg/tanhbysinh.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-options "-Ofast -fdump-tree-optimized" } */
> +/* { dg-require-effective-target c99_runtime } */
>  
>  extern float sinhf (float);
>  extern float tanhf (float);
> @@ -37,4 +38,4 @@ tanhbysinhl_ (long double x)
>  /* {dg-final { scan-tree-dump-not "tanhl " "optimized" }} */
>  /* { dg-final { scan-tree-dump "cosh " "optimized" } } */
>  /* { dg-final { scan-tree-dump "coshf " "optimized" } } */
> -/* { dg-final { scan-tree-dump "coshl " "optimized" } } */
> \ No newline at end of file
> +/* { dg-final { scan-tree-dump "coshl " "optimized" } } */


More information about the Gcc-patches mailing list