Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-ivdep-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-additional-options "-O3 -fopt-info-vec-optimized" } */
4
5 /* PR other/33426 */
6 /* Testing whether #pragma ivdep is working. */
7
8 void foo(int n, int *a, int *b, int *c) {
9 int i;
10 i = 0;
11 #pragma GCC ivdep
12 while(i < n)
13 {
14 a[i] = b[i] + c[i];
15 ++i;
16 }
17 }
18
19 void bar(int n, int *a, int *b, int *c) {
20 int i;
21 i = 0;
22 #pragma GCC ivdep
23 do
24 {
25 a[i] = b[i] + c[i];
26 ++i;
27 }
28 while(i < n);
29 }
30
31
32 /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
33 /* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
34 /* { dg-prune-output " version\[^\n\r]* alignment" } */