Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-73.c

raw
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-add-options bind_pic_locally } */
3 /* { dg-additional-options "-fdump-tree-optimized-details-blocks" } */
4
5 #include <stdarg.h>
6 #include "tree-vect.h"
7
8 #define N 16
9
10 int ic[N*2];
11 int ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
12
13 #define ia (ic+N)
14
15 __attribute__ ((noinline))
16 int main1 ()
17 {
18 int i, j;
19
20 for (i = 0; i < N; i++)
21 {
22 ia[i] = ib[i];
23 }
24
25 /* check results: */
26 #pragma GCC novector
27 for (i = 0; i < N; i++)
28 {
29 if (ia[i] != ib[i])
30 abort();
31 }
32
33 return 0;
34 }
35
36 int main (void)
37 {
38 check_vect ();
39
40 return main1 ();
41 }
42
43 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
44 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
45 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */