OSDN Git Service

PR tree-optimization/35982
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / pr35821-altivec.c
1 /* { dg-do compile { target { powerpc_altivec_ok } } } */
2
3 #include "altivec.h"
4
5 void
6 foo (float f_gain1, int n_tail, float * __restrict__ f_in_hptr,
7      float * __restrict__ f_out_hptr)
8 {
9   int i;
10   vector float *v_f_in_hptr, *v_f_out_hptr;
11
12   f_in_hptr = ( float* )v_f_in_hptr;
13   f_out_hptr = ( float* )v_f_out_hptr;
14
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++;
19   }
20 }
21
22 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
23 /* { dg-final { cleanup-tree-dump "vect" } } */
24