aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/vect/pr33426-ivdep.cc
blob: e5d88e0b2777ab64cdd7c938d3ab04f01d029453 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */
/* { dg-additional-options "-O3 -fopt-info-vec-optimized" } */

/* PR other/33426 */
/* Testing whether #pragma ivdep is working.  */

void foo(int n, int *a, int *b, int *c, int *d, int *e) {
  int i;
#pragma GCC ivdep
  for (i = 0; i < n; ++i) {
    a[i] = b[i] + c[i];
  }
}

/* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
/* { dg-final { cleanup-tree-dump "vect" } } */