summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/sve_peel_ind_3.c
blob: a2602e781a1724d272a16afc73896eedd2bbc9ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* Pick an arbitrary target for which unaligned accesses are more
   expensive.  */
/* { dg-options "-O3 -march=armv8-a+sve -msve-vector-bits=256 -mtune=thunderx" } */

#define N 32
#define MAX_START 8
#define COUNT 16

int x[MAX_START][N] __attribute__((aligned(32)));

void __attribute__((noinline, noclone))
foo (int start)
{
  for (int i = start; i < start + COUNT; ++i)
    x[start][i] = i;
}

/* We should operate on aligned vectors.  */
/* { dg-final { scan-assembler {\tadrp\tx[0-9]+, x\n} } } */
/* { dg-final { scan-assembler {\tubfx\t} } } */