2010-06-16 Mikael Pettersson <mikpe@it.uu.se>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr35821-spu.c
blob4cc255f07ee606ca90540b106b9ccde2d713a3a5
1 /* { dg-do compile { target { spu-*-* } } } */
3 void
4 foo (float f_gain1, int n_tail, float * __restrict__ f_in_hptr,
5 float * __restrict__ f_out_hptr)
7 int i;
8 __attribute__((__spu_vector__)) float *v_f_in_hptr, *v_f_out_hptr;
10 f_in_hptr = ( float* )v_f_in_hptr;
11 f_out_hptr = ( float* )v_f_out_hptr;
13 for( i = 0 ; i < n_tail ; i++ ) {
14 f_out_hptr[0] = f_in_hptr[0] * f_gain1;
15 f_in_hptr++;
16 f_out_hptr++;
20 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
21 /* { dg-final { cleanup-tree-dump "vect" } } */