summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/sve_live_1_run.c
blob: 99f0be353aa473de00ed45314089f27514dbd1fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* { dg-do run { target { aarch64_sve_hw } } } */
/* { dg-options "-O2 -ftree-vectorize -fno-inline -march=armv8-a+sve" } */

extern void abort(void);
#include <string.h>

#include "sve_live_1.c"

#define MAX 62
#define START 27

int main (void)
{
  int a[MAX];
  int i;

  memset (a, 0, MAX*sizeof (int));

  int ret = liveloop (START, MAX, a);

  if (ret != 89)
    abort ();

  for (i=0; i<MAX; i++)
    {
      if (a[i] != i+START+1)
	abort ();
    }
}