annotate gcc/testsuite/gcc.dg/vect/vect-vfa-01.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 int result[N] = {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27};
kono
parents:
diff changeset
8 int X[N] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25};
kono
parents:
diff changeset
9 int Y[N] = {};
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 __attribute__ ((noinline)) void
kono
parents:
diff changeset
12 foo (int *in, int *out)
kono
parents:
diff changeset
13 {
kono
parents:
diff changeset
14 int i;
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 for (i = 0; i < N; i++)
kono
parents:
diff changeset
17 out[i] = in[i] + 2;
kono
parents:
diff changeset
18 }
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 int
kono
parents:
diff changeset
21 main (void)
kono
parents:
diff changeset
22 {
kono
parents:
diff changeset
23 int i;
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 check_vect ();
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 foo (X, Y);
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 /* check results: */
kono
parents:
diff changeset
30 for (i = 0; i < N; i++)
kono
parents:
diff changeset
31 {
kono
parents:
diff changeset
32 if (Y[i] != result[i])
kono
parents:
diff changeset
33 abort ();
kono
parents:
diff changeset
34 }
kono
parents:
diff changeset
35 return 0;
kono
parents:
diff changeset
36 }
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */