annotate gcc/testsuite/gcc.dg/vect/vect-alias-check.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-do compile } */
kono
parents:
diff changeset
2 /* { dg-require-effective-target vect_int } */
kono
parents:
diff changeset
3 /* { dg-additional-options "--param=vect-max-version-for-alias-checks=2" } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 /* A test case showing four potential alias checks between a[i] and b[0], b[1],
kono
parents:
diff changeset
6 b[i+1] and b[i+2]. With alias check merging enabled, those four checks
kono
parents:
diff changeset
7 can be merged into two, and the loop will be vectorized with
kono
parents:
diff changeset
8 vect-max-version-for-alias-checks=2. */
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 void foo (int *a, int *b)
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 int i;
kono
parents:
diff changeset
13 for (i = 0; i < 1000; ++i)
kono
parents:
diff changeset
14 a[i] = b[0] + b[1] + b[i+1] + b[i+2];
kono
parents:
diff changeset
15 }
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */