Debian Codegraph @

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

raw
1 /* { dg-add-options vect_early_break } */
2 /* { dg-require-effective-target vect_early_break_hw } */
3 /* { dg-require-effective-target vect_int } */
4
5 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
6
7 #include "tree-vect.h"
8
9 #ifndef N
10 #define N 30
11 #endif
12
13 #ifndef IDX
14 #define IDX 15
15 #endif
16
17 int n_earlyclobbers;
18
19 typedef void* rtx;
20 rtx reload_earlyclobbers[N] = {0};
21
22 rtx foo = (void*)0xbadf00d;
23
24 int
25 __attribute__((noinline, noipa))
26 earlyclobber_operand_p (rtx x)
27 {
28 int i;
29
30 for (i = 0; i < n_earlyclobbers; i++)
31 if (reload_earlyclobbers[i] == x)
32 return 1;
33
34 return 0;
35 }
36
37 extern void abort ();
38
39 int main ()
40 {
41 check_vect ();
42
43 n_earlyclobbers = IDX;
44 if (earlyclobber_operand_p (foo))
45 abort ();
46
47 return 0;
48 }