URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 384 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O -ffast-math -fdump-tree-optimized" } */
|
/* { dg-options "-O -ffast-math -fdump-tree-optimized" } */
|
/* { dg-require-effective-target c99_runtime } */
|
/* { dg-require-effective-target c99_runtime } */
|
|
|
double test1 (double x)
|
double test1 (double x)
|
{
|
{
|
return __real __builtin_cexp(x * (__extension__ 1.0iF));
|
return __real __builtin_cexp(x * (__extension__ 1.0iF));
|
}
|
}
|
|
|
double test2(double x)
|
double test2(double x)
|
{
|
{
|
return __imag __builtin_cexp((__extension__ 1.0iF) * x);
|
return __imag __builtin_cexp((__extension__ 1.0iF) * x);
|
}
|
}
|
|
|
double test3(double x)
|
double test3(double x)
|
{
|
{
|
_Complex c = __builtin_cexp(x * (__extension__ 1.0iF));
|
_Complex c = __builtin_cexp(x * (__extension__ 1.0iF));
|
return __imag c + __real c;
|
return __imag c + __real c;
|
}
|
}
|
|
|
double test4(double x, double y)
|
double test4(double x, double y)
|
{
|
{
|
_Complex c = __builtin_cexp(x);
|
_Complex c = __builtin_cexp(x);
|
x = __builtin_exp (x);
|
x = __builtin_exp (x);
|
return x - __real c;
|
return x - __real c;
|
}
|
}
|
|
|
/* { dg-final { scan-tree-dump "cexpi" "optimized" } } */
|
/* { dg-final { scan-tree-dump "cexpi" "optimized" } } */
|
/* { dg-final { scan-tree-dump "sin" "optimized" } } */
|
/* { dg-final { scan-tree-dump "sin" "optimized" } } */
|
/* { dg-final { scan-tree-dump "cos" "optimized" } } */
|
/* { dg-final { scan-tree-dump "cos" "optimized" } } */
|
/* { dg-final { scan-tree-dump "return 0.0" "optimized" } } */
|
/* { dg-final { scan-tree-dump "return 0.0" "optimized" } } */
|
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.