SVE Intrinsics: Change return type of redirect_call to gcall.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / bb-slp-cond-1.c
blob8faf6b6e3aceebb5a33b3b9fc8446690be611b46
1 /* { dg-require-effective-target vect_condition } */
2 /* { dg-additional-options "-fdump-tree-vect-details" } */
4 #include "tree-vect.h"
6 #define N 128
8 __attribute__((noinline, noclone)) void
9 foo (int *a, int stride)
11 int i;
13 for (i = 0; i < N/stride; i++, a += stride)
15 a[0] = a[0] ? 1 : 5;
16 a[1] = a[1] ? 2 : 6;
17 a[2] = a[2] ? 3 : 7;
18 a[3] = a[3] ? 4 : 8;
23 int a[N];
24 int main ()
26 int i;
28 check_vect ();
30 for (i = 0; i < N; i++)
32 a[i] = i;
33 asm volatile ("" ::: "memory");
36 foo (a, 4);
38 #pragma GCC novector
39 for (i = 1; i < N; i++)
40 if (a[i] != i%4 + 1)
41 abort ();
43 if (a[0] != 5)
44 abort ();
46 return 0;
49 /* { dg-final { scan-tree-dump {(no need for alias check [^\n]* when VF is 1|no alias between [^\n]* when [^\n]* is outside \(-16, 16\))} "vect" { target vect_element_align } } } */
50 /* { dg-final { scan-tree-dump-times "loop vectorized" 1 "vect" { target { vect_element_align && { ! { amdgcn-*-* } } } } } } */
51 /* { dg-final { scan-tree-dump-times "loop vectorized" 2 "vect" { target { amdgcn-*-* } } } } */