annotate gcc/testsuite/gcc.dg/vect/vect-nb-iter-ub-2.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-additional-options "-fdump-tree-cunroll-details" } */
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 #include "tree-vect.h"
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 int ii[32];
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
6 struct { char a; char b[66]; } cc = { 0,
111
kono
parents:
diff changeset
7 { 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0,
kono
parents:
diff changeset
8 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0,
kono
parents:
diff changeset
9 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0,
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
10 30, 0, 31, 0 }
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
11 };
111
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 void __attribute__((noinline,noclone))
kono
parents:
diff changeset
14 foo (int s)
kono
parents:
diff changeset
15 {
kono
parents:
diff changeset
16 int i;
kono
parents:
diff changeset
17 for (i = 0; i < s; i++)
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
18 ii[i] = (int) cc.b[i*2];
111
kono
parents:
diff changeset
19 }
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 int main (int argc, const char **argv)
kono
parents:
diff changeset
22 {
kono
parents:
diff changeset
23 int i;
kono
parents:
diff changeset
24 check_vect ();
kono
parents:
diff changeset
25 foo (32);
kono
parents:
diff changeset
26 for (i = 0; i < 32; i++)
kono
parents:
diff changeset
27 if (ii[i] != i)
kono
parents:
diff changeset
28 __builtin_abort ();
kono
parents:
diff changeset
29 }
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { target { i?86-*-* x86_64-*-* } } } } */
kono
parents:
diff changeset
32 /* { dg-final { scan-tree-dump "loop turned into non-loop; it never loops" "cunroll" { target { i?86-*-* x86_64-*-* } } } } */
kono
parents:
diff changeset
33 /* { dg-final { scan-tree-dump-not "loop with 2 iterations completely unrolled" "cunroll" { target { i?86-*-* x86_64-*-* } } } } */