PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-trapping-math-vect-ifcvt-12.c
blobe87bcb8b43d3b82d30f8d3c2340b4968c8dd8da4
1 /* { dg-require-effective-target vect_condition } */
2 /* { dg-require-effective-target vect_float } */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #define N 16
8 #define MAX 42
10 float A[N] = {36,39,42,45,43,32,21,12,23,34,45,56,67,78,89,11};
11 float B[N] = {0,0,0,42,42,0,0,0,0,0,42,42,42,42,42,0};
13 extern void abort(void);
15 int main ()
17 int i, j;
19 check_vect ();
20 for (i = 0; i < 16; i++)
21 A[i] = ( A[i] > MAX ? MAX : 0);
23 /* check results: */
24 for (i = 0; i < N; i++)
25 if (A[i] != B[i])
26 abort ();
28 return 0;
31 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */