i386: Adjust rtx cost for imulq and imulw [PR115749]
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-cond-2.c
blob094cfe76701be295891c30b3253c06dcfe23ab1b
1 /* { dg-require-effective-target vect_condition } */
3 #include "tree-vect.h"
5 #define N 16
7 int c[N] = {3,2,1,10,1,42,3,4,50,9,32,8,11,10,1,2};
8 int a[N+1] = {0,16,32,48,64,128,256,512,0,16,32,48,64,128,256,512,1024};
10 __attribute__ ((noinline)) void
11 foo (int *x)
13 int i;
14 int curr_a, flag, next_a;
16 curr_a = a[0];
18 for (i = 0; i < N; i++)
20 flag = *x > c[i];
21 next_a = a[i+1];
22 curr_a = flag ? curr_a : next_a;
25 *x = curr_a;
28 int main (void)
30 int x = 7;
32 check_vect ();
34 foo (&x);
36 if (x != 256)
37 abort ();
39 return 0;
42 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */