libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-prof / pr66295.c
blob36a30acc24e8ef581813016b535e546d11bb4668
1 /* { dg-require-ifunc "" } */
2 /* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } } */
3 /* { dg-require-effective-target avx512f } */
4 /* { dg-options "-O2" } */
6 static double bar (double *__restrict, double *__restrict, int)
7 __attribute__ ((target_clones("avx,avx2,avx512f,default")));
9 double
10 foo (double *__restrict a, double *__restrict b, int n)
12 return bar (a,b,n);
15 double
16 bar (double *__restrict a, double *__restrict b, int n)
18 double s;
19 int i;
20 s = 0.0;
21 for (i=0; i<n; i++)
22 s += a[i] + b[i];
24 return s;
27 #define N 5
29 int main ()
31 double a[N] = {1.2f, 1.2f, 1.2f, 1.2f, 1.2f };
32 double b[N] = {1.2f, 1.2f, 1.2f, 1.2f, 1.2f };
34 __builtin_printf ("value: %.5f\n", foo (a, b, N));
35 return 0;