Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr99100.c

raw
1 /* PR target/99100 */
2 /* { dg-do compile } */
3 /* { dg-options "-Ofast -mavx512f -fopenmp-simd -mprefer-vector-width=512" } */
4 /* { dg-final { scan-assembler "_ZGVeN8v_myfunc" } } */
5 /* { dg-final { scan-assembler "_ZGVeN8v_sin" } } */
6
7 #pragma omp declare simd notinbranch
8 double sin (double x);
9 #pragma omp declare simd simdlen(8) notinbranch
10 __attribute__((const)) double myfunc (double x);
11
12 #define N 1024
13 __attribute__((__aligned__ (256))) double a[N], b[N], c[N];
14
15 void
16 foo ()
17 {
18 for (int i = 0; i < N; i++)
19 a[i] = myfunc (b[i]);
20 for (int i = 0; i < N; i++)
21 c[i] = sin (b[i]);
22 }