diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c new file mode 100644 index 000000000..00e631b13 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-fast-math-vect-pr29925.c @@ -0,0 +1,40 @@ +/* { dg-require-effective-target vect_float } */ + +#include <stdlib.h> +#include "../../tree-vect.h" + +__attribute__ ((noinline)) 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 "vectorization not profitable" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + |