annotate gcc/testsuite/gcc.dg/vect/no-vfa-vect-79.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_float } */
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
kono
parents:
diff changeset
8 float fa[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
kono
parents:
diff changeset
9 float fb[N+4] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 7.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0};
kono
parents:
diff changeset
10 float fc[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 7.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5};
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 /* Like vect-80.c but the pointers are not annotated as restricted,
kono
parents:
diff changeset
13 and therefore can't be antialiased. */
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 __attribute__ ((noinline)) int
kono
parents:
diff changeset
16 main1 (float *pa, float *pb, float *pc)
kono
parents:
diff changeset
17 {
kono
parents:
diff changeset
18 int i;
kono
parents:
diff changeset
19 float *q = pb + 4;
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 for (i = 0; i < N; i++)
kono
parents:
diff changeset
22 {
kono
parents:
diff changeset
23 pa[i] = q[i] * pc[i];
kono
parents:
diff changeset
24 }
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 for (i = 0; i < N; i++)
kono
parents:
diff changeset
27 {
kono
parents:
diff changeset
28 if (pa[i] != q[i] * pc[i])
kono
parents:
diff changeset
29 abort();
kono
parents:
diff changeset
30 }
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 return 0;
kono
parents:
diff changeset
33 }
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 int main (void)
kono
parents:
diff changeset
37 {
kono
parents:
diff changeset
38 check_vect ();
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 main1 (fa, fb, fc);
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 return 0;
kono
parents:
diff changeset
43 }
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 /* Currently the loops fail to vectorize due to aliasing problems.
kono
parents:
diff changeset
46 If/when the aliasing problems are resolved, unalignment may
kono
parents:
diff changeset
47 prevent vectorization on some targets. */
kono
parents:
diff changeset
48 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
kono
parents:
diff changeset
49 /* { dg-final { scan-tree-dump-times "can't determine dependence" 1 "vect" { target { ! vect_multiple_sizes } } } } */
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
50 /* { dg-final { scan-tree-dump "can't determine dependence" "vect" { target vect_multiple_sizes } } } */