OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / pr35821-spu.c
1 /* { dg-do compile { target { spu-*-* } } } */
2
3 void
4 foo (float f_gain1, int n_tail, float * __restrict__ f_in_hptr,
5      float * __restrict__ f_out_hptr)
6 {
7   int i;
8   __attribute__((__spu_vector__)) float *v_f_in_hptr, *v_f_out_hptr;
9
10   f_in_hptr = ( float* )v_f_in_hptr;
11   f_out_hptr = ( float* )v_f_out_hptr;
12
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++;
17   }
18 }
19
20 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
21 /* { dg-final { cleanup-tree-dump "vect" } } */
22