i386: Adjust rtx cost for imulq and imulw [PR115749]
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-cond-reduc-5.c
blob1220875553b6845a50c316d1585fc3814d776020
1 #include "tree-vect.h"
3 #define N 512
5 int a[N], b[N];
7 int __attribute__((noipa))
8 foo (int aval, int bval)
10 int i, res = 0;
11 for (i=0; i<N; i++)
13 if (a[i] != 0)
14 res = aval;
15 if (b[i] != 0)
16 res = bval;
18 return res;
21 int main()
23 check_vect ();
24 if (foo (1, 2) != 0)
25 abort ();
26 a[3] = 1;
27 b[4] = 1;
28 if (foo (1, 2) != 2)
29 abort ();
30 a[7] = 1;
31 if (foo (1, 2) != 1)
32 abort ();
33 return 0;
36 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_condition } } } */