Mercurial > hg > CbC > CbC_gcc
view 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 |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-require-effective-target vect_int } */ /* { dg-additional-options "--param=vect-max-version-for-alias-checks=2" } */ /* A test case showing four potential alias checks between a[i] and b[0], b[1], b[i+1] and b[i+2]. With alias check merging enabled, those four checks can be merged into two, and the loop will be vectorized with vect-max-version-for-alias-checks=2. */ void foo (int *a, int *b) { int i; for (i = 0; i < 1000; ++i) a[i] = b[0] + b[1] + b[i+1] + b[i+2]; } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */