2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr35821-altivec.c
blob79fa926ec6791bc8df2ab045011bbb74751f0d51
1 /* { dg-do compile { target { powerpc_altivec_ok } } } */
3 #include "altivec.h"
5 void
6 foo (float f_gain1, int n_tail, float * __restrict__ f_in_hptr,
7 float * __restrict__ f_out_hptr)
9 int i;
10 vector float *v_f_in_hptr, *v_f_out_hptr;
12 f_in_hptr = ( float* )v_f_in_hptr;
13 f_out_hptr = ( float* )v_f_out_hptr;
15 for( i = 0 ; i < n_tail ; i++ ) {
16 f_out_hptr[0] = f_in_hptr[0] * f_gain1;
17 f_in_hptr++;
18 f_out_hptr++;
22 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
23 /* { dg-final { cleanup-tree-dump "vect" } } */