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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [fast-math-vect-pr29925.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { 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
 

powered by: WebSVN 2.1.0

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