LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-live-2.c
bloba6daa61829e7ca51ef2d1e8540cd60782cdeea8a
1 /* { dg-require-effective-target vect_long } */
2 /* { dg-require-effective-target vect_shift } */
3 /* { dg-additional-options "-fno-tree-scev-cprop" } */
5 #include "tree-vect.h"
7 /* Statement used outside the loop.
8 NOTE: SCEV disabled to ensure the live operation is not removed before
9 vectorization. */
10 __attribute__ ((noinline)) int
11 liveloop (int start, int n, int *x, int *y)
13 int i = start;
14 int j;
15 int ret;
17 for (j = 0; j < n; ++j)
19 i += 1;
20 x[j] = i;
21 ret = y[j];
23 return ret;
26 #define MAX 97
27 #define START 13
29 int
30 main (void)
32 int a[MAX];
33 int b[MAX];
34 int i;
36 check_vect ();
38 for (i=0; i<MAX; i++)
40 __asm__ volatile ("");
41 b[i] = i;
44 int ret = liveloop (START, MAX, a, b);
46 if (ret != MAX - 1)
47 abort ();
49 for (i=0; i<MAX; i++)
51 __asm__ volatile ("");
52 if (a[i] != i+START+1)
53 abort ();
57 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
58 /* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 1 "vect" } } */