Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-early-break_46.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_float } */
5
6 #include <complex.h>
7
8 #define N 1024
9 complex double vect_a[N];
10 complex double vect_b[N];
11
12 complex double test4(complex double x)
13 {
14 complex double ret = 0;
15 for (int i = 0; i < N; i++)
16 {
17 vect_b[i] += x + i;
18 if (vect_a[i] == x)
19 return i;
20 vect_a[i] += x * vect_b[i];
21
22 }
23 return ret;
24 }
25
26 /* At -O2 we can't currently vectorize this because of the libcalls not being
27 lowered. */
28 /* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { xfail *-*-* } } } */