OSDN Git Service

2766ced28715ed0be2f12a8e3e077c569b16389a
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / costmodel / i386 / costmodel-fast-math-vect-pr29925.c
1 /* { dg-require-effective-target vect_float } */
2
3 #include <stdlib.h>
4 #include "../../tree-vect.h"
5
6 __attribute__ ((noinline))
7 void interp_pitch(float *exc, float *interp, int pitch, int len)
8 {
9    int i,k;
10    int maxj;
11
12    maxj=3;
13    for (i=0;i<len;i++)
14    {
15       float tmp = 0;
16       for (k=0;k<7;k++)
17       {
18          tmp += exc[i-pitch+k+maxj-6];
19       }
20       interp[i] = tmp;
21    }
22 }
23
24 int main()
25 {
26    float *exc = calloc(126,sizeof(float));
27    float *interp = calloc(80,sizeof(float));
28    int pitch = -35;
29
30    check_vect ();
31
32    interp_pitch(exc, interp, pitch, 80);
33    free(exc);
34    free(interp);
35    return 0;
36 }
37
38 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
39 /* { dg-final { cleanup-tree-dump "vect" } } */
40