OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [builtins-62.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -ffinite-math-only -fdump-tree-optimized" } */
3
/* { dg-require-effective-target c99_runtime } */
4
 
5
double test1 (double x)
6
{
7
  double s, c;
8
  s = __builtin_sin (x);
9
  c = __builtin_cos (x);
10
  return s + c;
11
}
12
 
13
double test2 (double x)
14
{
15
  double s, c;
16
  x = x * 2;
17
  s = __builtin_sin (x);
18
  c = __builtin_cos (x);
19
  return s + c;
20
}
21
 
22
double test3 (double x, int b)
23
{
24
  double s, c;
25
  if (b)
26
    x = x * 2;
27
  s = __builtin_sin (x);
28
  c = __builtin_cos (x);
29
  return s + c;
30
}
31
 
32
double test4 (double x)
33
{
34
  double s;
35
  x = x * 2;
36
  s = __builtin_sin (x);
37
  return s;
38
}
39
 
40
/* { dg-final { scan-tree-dump-times "cexpi" 3 "optimized" } } */
41
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.