Debian Codegraph @

gcc/testsuite/c-c++-common/pragma-target-1.c

raw
1 /* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
2 /* { dg-options "-mno-avx -O3" } */
3
4 void f (double *x)
5 {
6 for (int i = 0; i != 8; ++i)
7 x[i] *= 2;
8 }
9
10 #pragma GCC target("avx")
11
12 void g (double *x)
13 {
14 for (int i = 0; i != 8; ++i)
15 x[i] *= 2;
16 }
17
18 /* Make sure the target pragma affected only g() and not also f(). */
19 /* { dg-final { scan-assembler-times vzeroupper 1 } } */