Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / gcc.dg / vect / vect-ivdep-2.c
blob4e3dcbd322b31645d4c1a4b49aadab497cc16254
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 } */
34 /* { dg-final { cleanup-tree-dump "vect" } } */