SVE Intrinsics: Change return type of redirect_call to gcall.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-live-1.c
blobe4a6433a89961b008a2b766f6669e16f378ca01e
1 /* Disabling epilogues until we find a better way to deal with scans. */
2 /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
3 /* { dg-require-effective-target vect_int } */
4 /* { dg-additional-options "-fno-tree-scev-cprop" } */
6 #include "tree-vect.h"
8 /* Statement used outside the loop.
9 NOTE: SCEV disabled to ensure the live operation is not removed before
10 vectorization. */
11 __attribute__ ((noinline)) int
12 liveloop (int start, int n, int *x)
14 int i = start;
15 int j;
17 for (j = 0; j < n; ++j)
19 i += 1;
20 x[j] = i;
22 return i;
25 #define MAX 62
26 #define START 27
28 int
29 main (void)
31 int a[MAX];
32 int i;
34 check_vect ();
36 int ret = liveloop (START, MAX, a);
38 if (ret != MAX + START)
39 abort ();
41 #pragma GCC novector
42 for (i=0; i<MAX; i++)
44 __asm__ volatile ("");
45 if (a[i] != i+START+1)
46 abort ();
50 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
51 /* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 1 "vect" } } */