PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-alias-check.c
blobab90895192f0f35b0758ee12eecb70b519eb4121
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-additional-options "--param=vect-max-version-for-alias-checks=2" } */
5 /* A test case showing four potential alias checks between a[i] and b[0], b[1],
6 b[i+1] and b[i+2]. With alias check merging enabled, those four checks
7 can be merged into two, and the loop will be vectorized with
8 vect-max-version-for-alias-checks=2. */
10 void foo (int *a, int *b)
12 int i;
13 for (i = 0; i < 1000; ++i)
14 a[i] = b[0] + b[1] + b[i+1] + b[i+2];
17 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */