tree-optimization/115646 - ICE with pow shrink-wrapping from bitfield
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / slp-reduc-5.c
blob11f5a7414cf30eda182bfdddbb52f6f3730954f3
1 /* Disabling epilogues until we find a better way to deal with scans. */
2 /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
3 /* { dg-require-effective-target vect_int } */
5 #include <stdarg.h>
6 #include "tree-vect.h"
8 #define N 128
10 int c[N];
12 /* Vectorization of reduction using loop-aware SLP. */
14 __attribute__ ((noinline))
15 int main1 (int n, int res0, int res1)
17 int i;
18 int max0 = -100, max1 = -313;
20 for (i = 0; i < n; i++) {
21 max1 = max1 < c[2*i+1] ? c[2*i+1] : max1;
22 max0 = max0 < c[2*i] ? c[2*i] : max0;
25 /* Check results: */
26 if (max0 != res0
27 || max1 != res1)
28 abort ();
30 return 0;
33 int main (void)
35 int i;
37 check_vect ();
39 for (i = 0; i < N; i++)
40 c[i] = (i+3) * -1;
42 c[0] = c[1] = -100;
43 main1 (N/2, -5, -6);
44 return 0;
47 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail vect_no_int_min_max } } } */
48 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_min_max } } } */
49 /* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR" 0 "vect" } } */