testsuite: Revert to the original version of pr100056.c
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-early-break_125-pr114403.c
blobb1dc8a5277aaaafedfe2a4b3e76fea89a1f22257
1 /* { dg-add-options vect_early_break } */
2 /* { dg-require-effective-target vect_early_break_hw } */
3 /* { dg-require-effective-target vect_long_long } */
5 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
7 #include "tree-vect.h"
9 long x[9];
10 long a[20];
11 struct { long x; long b[40]; } b;
12 int __attribute__((noipa))
13 foo (int n)
15 int i = 0;
16 int k = 0;
19 if (x[k++]) // early exit, loop upper bound is 8 because of this
20 break;
21 a[i] = b.b[2*i]; // the misaligned 2*i access causes peeling for gaps
23 while (++i < n);
24 return i;
27 int main()
29 check_vect ();
31 x[8] = 1;
32 if (foo (20) != 8)
33 __builtin_abort ();
34 return 0;