SVE Intrinsics: Change return type of redirect_call to gcall.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-recurr-6.c
blob3b9844d31b41cb205774687915df75b943a81516
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-require-effective-target vect_perm } */
4 #include "tree-vect.h"
6 void __attribute__((noipa))
7 foo (int * __restrict__ a, int * __restrict__ b, int * __restrict__ c, int n)
9 int t = *c;
10 for (int i = 0; i < n; ++i)
12 b[i] = a[i] - t;
13 t = a[i];
17 int a[64], b[64];
19 int
20 main ()
22 check_vect ();
23 for (int i = 0; i < 64; ++i)
25 a[i] = i;
26 __asm__ volatile ("" ::: "memory");
28 int c = 7;
29 foo (a, b, &c, 63);
30 #pragma GCC novector
31 for (int i = 1; i < 63; ++i)
32 if (b[i] != a[i] - a[i-1])
33 abort ();
34 if (b[0] != -7)
35 abort ();
36 return 0;
39 /* ??? We miss epilogue handling for first order recurrences. */
40 /* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { target vect_fully_masked } } } */