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] - Rev 154

Go to most recent revision | Compare with Previous | Blame | View Log

/* { dg-require-effective-target vect_float } */
 
#include <stdlib.h>
#include "tree-vect.h"
 
void interp_pitch(float *exc, float *interp, int pitch, int len)
{
   int i,k;
   int maxj;
 
   maxj=3;
   for (i=0;i<len;i++)
   {
      float tmp = 0;
      for (k=0;k<7;k++)
      {
         tmp += exc[i-pitch+k+maxj-6];
      }
      interp[i] = tmp;
   }
}
 
int main()
{
   float *exc = calloc(126,sizeof(float));
   float *interp = calloc(80,sizeof(float));
   int pitch = -35;
 
   check_vect ();
 
   interp_pitch(exc, interp, pitch, 80);
   free(exc);
   free(interp);
   return 0;
}
 
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
 
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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