testsuite: Fix up vect-early-break_100-pr113287.c testcase [PR113287]
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-early-break_100-pr113287.c
blob59c1e102870d6cf36c76b8ef6f7eccc07f86a068
1 /* { dg-add-options vect_early_break } */
2 /* { dg-require-effective-target vect_early_break } */
3 /* { dg-require-effective-target vect_long_long } */
5 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
7 #include "tree-vect.h"
9 __attribute__((noipa)) void
10 bar (unsigned long long *p)
12 __builtin_memset (p, 0, 142 * sizeof (unsigned long long));
13 p[17] = 0x50000000000ULL;
16 __attribute__((noipa)) int
17 foo (void)
19 unsigned long long r[142];
20 bar (r);
21 unsigned long long v = ((long long) r[0] >> 31);
22 if (v + 1 > 1)
23 return 1;
24 for (unsigned long long i = 1; i <= 140; ++i)
25 if (r[i] != v)
26 return 1;
27 unsigned long long w = r[141];
28 if ((unsigned long long) (((long long) (w << 60)) >> 60) != v)
29 return 1;
30 return 0;
33 int
34 main ()
36 check_vect ();
38 if (foo () != 1)
39 __builtin_abort ();