/* { dg-do run { target powerpc*-*-* } } */ /* { dg-do run { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* x86_64-*-* } } */ #include #include "tree-vect.h" #define N 16 int main1 () { int i, j; float a[N]; float c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; float d[N] = {0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30}; i = 0; j = 0; while (i < 5*N) { a[j] = c[j]; i += 5; j++; } /* check results: */ for (i = 0; i 0; i--) { a[N-i] = d[N-i]; } /* check results: */ for (i = 0; i < N; i++) { if (a[i] != d[i]) abort (); } return 0; } int main (void) { check_vect (); return main1 (); } /* xfail: local arrays can't be aligned on a boundary greater than STACK_BOUNDARY */ /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" {xfail i?86-*-* x86_64-*-*} } } */