PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-intfloat-conversion-1.c
blobbef3efa5658ae6d91010d286967e319906f9aeb5
1 /* { dg-require-effective-target vect_float } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 32
8 int ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
9 float fa[N];
11 __attribute__ ((noinline)) int main1 ()
13 int i;
15 /* int -> float */
16 for (i = 0; i < N; i++)
18 fa[i] = (float) ib[i];
21 /* check results: */
22 for (i = 0; i < N; i++)
24 if (fa[i] != (float) ib[i])
25 abort ();
28 return 0;
31 int main (void)
33 check_vect ();
35 return main1 ();
38 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_intfloat_cvt } } } */