Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-live-1.c
blobe170875d7abe537782c1f4a96b01f26fbfe74a45
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-fno-tree-scev-cprop" } */
4 #include "tree-vect.h"
6 /* Statement used outside the loop.
7 NOTE: SCEV disabled to ensure the live operation is not removed before
8 vectorization. */
9 __attribute__ ((noinline)) int
10 liveloop (int start, int n, int *x)
12 int i = start;
13 int j;
15 for (j = 0; j < n; ++j)
17 i += 1;
18 x[j] = i;
20 return i;
23 #define MAX 62
24 #define START 27
26 int
27 main (void)
29 int a[MAX];
30 int i;
32 check_vect ();
34 int ret = liveloop (START, MAX, a);
36 if (ret != MAX + START)
37 abort ();
39 for (i=0; i<MAX; i++)
41 __asm__ volatile ("");
42 if (a[i] != i+START+1)
43 abort ();
47 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
48 /* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 1 "vect" } } */