aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/vect-epilogues-3.c
blob: e88ab30c770f2bc983d0e5c47fa4292a97c7a6e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-O3 -mavx512bw -mtune=znver4 --param vect-partial-vector-usage=0 -fdump-tree-vect-optimized" } */

int test (signed char *data, int n)
{
  int sum = 0;
  for (int i = 0; i < n; ++i)
    sum += data[i];
  return sum;
}

/* { dg-final { scan-tree-dump "loop vectorized using 64 byte vectors" "vect" } } */
/* { dg-final { scan-tree-dump "loop vectorized using 32 byte vectors" "vect" } } */
/* { dg-final { scan-tree-dump "loop vectorized using 16 byte vectors" "vect" } } */
/* { dg-final { scan-tree-dump "loop vectorized using 8 byte vectors" "vect" { target { ! ia32 } } } } */