Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-early-break_21.c

raw
1 /* { dg-add-options vect_early_break } */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target vect_early_break } */
4 /* { dg-require-effective-target vect_int } */
5
6 /* { dg-additional-options "-Ofast" } */
7
8 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! ia32 } } } } */
9
10 #include <stdbool.h>
11
12 #ifndef N
13 #define N 803
14 #endif
15 unsigned vect_b[N];
16 struct testStruct {
17 long e;
18 long f;
19 bool a : 1;
20 bool b : 1;
21 int c : 14;
22 int d;
23 };
24 struct testStruct vect_a[N];
25
26 unsigned test4(unsigned x)
27 {
28 unsigned ret = 0;
29 for (int i = 0; i < N; i++)
30 {
31 vect_b[i] = x + i;
32 if (vect_a[i].a)
33 return true;
34 vect_a[i].e = x;
35 }
36 return ret;
37 }
38