aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/profile-generate-4.c
blob: c2b999fe4cb378a5f0b4e83d40910f3cd6378ede (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* PR106912 */
/* { dg-require-profiling "-fprofile-generate" } */
/* { dg-options "-O2 -fprofile-generate -ftree-vectorize" } */

__attribute__ ((__simd__))
__attribute__ ((__nothrow__ , __leaf__ , __const__, __noinline__))
double foo (double x);

void bar(double *f, int n)
{
  int i;
  for (i = 0; i < n; i++)
    f[i] = foo(f[i]);
}

double foo(double x)
{
  return x * x / 3.0;
}