OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [fast-math-vect-pr29925.c] - Blame information for rev 816

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.