aarch64: Fix sve/acle/general/ldff1_8.c failures
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-vfa-vect-102.c
blob26b9cd1c4276623e6e446f4a3c68415ff69b08fb
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "--param vect-max-version-for-alias-checks=0" } */
4 #include <stdlib.h>
5 #include <stdarg.h>
6 #include "tree-vect.h"
8 #define N 9
10 struct extraction
12 int a[N];
13 int b[N];
16 static int a[N] = {1,2,3,4,5,6,7,8,9};
17 static int b[N] = {2,3,4,5,6,7,8,9,9};
19 __attribute__ ((noinline))
20 int main1 (int x, int y) {
21 int i;
22 struct extraction *p;
23 p = (struct extraction *) malloc (sizeof (struct extraction));
25 for (i = 0; i < N; i++)
27 p->a[i] = a[i];
28 asm volatile ("" ::: "memory");
31 /* Not vectorizable: distance 1. */
32 #pragma GCC unroll 0
33 for (i = 0; i < N - 1; i++)
35 *((int *)p + x + i + 1) = *((int *)p + x + i);
38 /* check results: */
39 #pragma GCC novector
40 for (i = 0; i < N; i++)
42 if (p->a[i] != 1)
43 abort();
45 return 0;
48 int main (void)
50 check_vect ();
52 return main1 (0, N);
55 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
56 /* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 1 "vect" { target { ! vect_multiple_sizes } } } } */
57 /* { dg-final { scan-tree-dump "possible dependence between data-refs" "vect" { target vect_multiple_sizes } } } */