111
|
1 /* { dg-require-effective-target vect_int } */
|
|
2 /* { dg-additional-options "-fno-tree-scev-cprop" } */
|
|
3
|
|
4 #include "tree-vect.h"
|
|
5
|
|
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)
|
|
11 {
|
|
12 int i = start;
|
|
13 int j;
|
|
14
|
|
15 for (j = 0; j < n; ++j)
|
|
16 {
|
|
17 i += 1;
|
|
18 x[j] = i;
|
|
19 }
|
|
20 return i;
|
|
21 }
|
|
22
|
|
23 #define MAX 62
|
|
24 #define START 27
|
|
25
|
|
26 int
|
|
27 main (void)
|
|
28 {
|
|
29 int a[MAX];
|
|
30 int i;
|
|
31
|
|
32 check_vect ();
|
|
33
|
|
34 int ret = liveloop (START, MAX, a);
|
|
35
|
|
36 if (ret != MAX + START)
|
|
37 abort ();
|
|
38
|
|
39 for (i=0; i<MAX; i++)
|
|
40 {
|
|
41 __asm__ volatile ("");
|
|
42 if (a[i] != i+START+1)
|
|
43 abort ();
|
|
44 }
|
|
45 }
|
|
46
|
|
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" } } */
|