i386: Adjust rtx cost for imulq and imulw [PR115749]
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr31699.c
blobb0b9971fcfc9f6f90ccef7bf1de10fd109c3d07b
1 /* { dg-require-effective-target vect_float } */
3 #include <stdlib.h>
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 float x[256];
9 __attribute__ ((noinline))
10 float *foo(void)
12 float *z = malloc (sizeof(float) * 256);
14 int i;
15 for (i=0; i<256; ++i)
16 z[i] = x[i] + 1.0f;
18 return z;
22 int main()
24 int i;
26 check_vect ();
28 for (i = 0; i < 256; i++)
29 x[i] = (float) i;
31 foo();
33 return 0;
36 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_intfloat_cvt } } } */
37 /* { dg-final { scan-tree-dump-times "vector alignment may not be reachable" 1 "vect" { target { ! vector_alignment_reachable } } } } */
38 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { ! vector_alignment_reachable } } } } */