annotate gcc/testsuite/gcc.dg/vect/no-vfa-vect-37.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-require-effective-target vect_int } */
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 #include <stdarg.h>
kono
parents:
diff changeset
4 #include "tree-vect.h"
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 #define N 16
kono
parents:
diff changeset
7 char x[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
kono
parents:
diff changeset
8 char cb[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 __attribute__ ((noinline))
kono
parents:
diff changeset
11 int main1 (char *y)
kono
parents:
diff changeset
12 {
kono
parents:
diff changeset
13 struct {
kono
parents:
diff changeset
14 char *p;
kono
parents:
diff changeset
15 char *q;
kono
parents:
diff changeset
16 } s;
kono
parents:
diff changeset
17 int i;
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 /* Not vectorized - can't antialias the pointer s.p from the array cb. */
kono
parents:
diff changeset
20 s.p = y;
kono
parents:
diff changeset
21 for (i = 0; i < N; i++)
kono
parents:
diff changeset
22 {
kono
parents:
diff changeset
23 s.p[i] = cb[i];
kono
parents:
diff changeset
24 }
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 /* check results: */
kono
parents:
diff changeset
27 for (i = 0; i < N; i++)
kono
parents:
diff changeset
28 {
kono
parents:
diff changeset
29 if (s.p[i] != cb[i])
kono
parents:
diff changeset
30 abort ();
kono
parents:
diff changeset
31 }
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 /* Not vectorized - can't antialias the pointer s.p from the pointer s.q. */
kono
parents:
diff changeset
34 s.q = cb;
kono
parents:
diff changeset
35 for (i = 0; i < N; i++)
kono
parents:
diff changeset
36 {
kono
parents:
diff changeset
37 s.p[i] = s.q[i];
kono
parents:
diff changeset
38 }
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 /* check results: */
kono
parents:
diff changeset
41 for (i = 0; i < N; i++)
kono
parents:
diff changeset
42 {
kono
parents:
diff changeset
43 if (s.p[i] != s.q[i])
kono
parents:
diff changeset
44 abort ();
kono
parents:
diff changeset
45 }
kono
parents:
diff changeset
46
kono
parents:
diff changeset
47 return 0;
kono
parents:
diff changeset
48 }
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 int main (void)
kono
parents:
diff changeset
51 {
kono
parents:
diff changeset
52 check_vect ();
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 return main1 (x);
kono
parents:
diff changeset
55 }
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 /* Currently the loops fail to vectorize due to aliasing problems.
kono
parents:
diff changeset
58 If/when the aliasing problems are resolved, unalignment may
kono
parents:
diff changeset
59 prevent vectorization on some targets. */
kono
parents:
diff changeset
60 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail *-*-* } } } */
kono
parents:
diff changeset
61 /* { dg-final { scan-tree-dump-times "can't determine dependence" 2 "vect" { target { ! vect_multiple_sizes } } } } */
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
62 /* { dg-final { scan-tree-dump "can't determine dependence" "vect" { target vect_multiple_sizes } } } */