SVE Intrinsics: Change return type of redirect_call to gcall.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-shift-3.c
blob0a9d562feb56ec69e944d0a3581853249d9642ae
1 /* { dg-require-effective-target vect_shift } */
2 /* { dg-require-effective-target vect_int } */
4 #include "tree-vect.h"
6 #define N 32
8 unsigned short dst[N] __attribute__((aligned(N)));
9 unsigned short src[N] __attribute__((aligned(N)));
11 __attribute__ ((noinline))
12 void array_shift(void)
14 int i;
15 for (i = 0; i < N; i++)
16 dst[i] = src[i] >> 3;
19 int main()
21 volatile int i;
22 check_vect ();
24 for (i = 0; i < N; i++)
25 src[i] = i << 3;
27 array_shift ();
29 #pragma GCC novector
30 for (i = 0; i < N; i++)
31 if (dst[i] != i)
32 abort ();
34 return 0;
37 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */