2018-01-16 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-ivdep-2.c
blobac2dbc19dca2329f1cb0973348b0dbe6afd8b615
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-additional-options "-O3 -fopt-info-vec-optimized" } */
5 /* PR other/33426 */
6 /* Testing whether #pragma ivdep is working. */
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)
14 a[i] = b[i] + c[i];
15 ++i;
19 void bar(int n, int *a, int *b, int *c) {
20 int i;
21 i = 0;
22 #pragma GCC ivdep
25 a[i] = b[i] + c[i];
26 ++i;
28 while(i < n);
32 /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
33 /* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */