diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/vect')
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/vect-ivdep-1.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/vect-ivdep-1.c b/gcc/testsuite/gcc.dg/vect/vect-ivdep-1.c new file mode 100644 index 00000000000..8767bb87b7e --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-ivdep-1.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_float } */ +/* { dg-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, j; +#pragma GCC ivdep + for (i = 0; i < n; ++i) { + a[i] = b[i] + c[i]; + } +} + +/* { dg-message "loop vectorized" "" { target *-*-* } 0 } */ +/* { dg-bogus "version" "" { target *-*-* } 0 } */ +/* { dg-bogus "alias" "" { target *-*-* } 0 } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ |