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