1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-fno-tree-scev-cprop" } */
6 /* Statement in SLP vectorization used outside the loop.
7 NOTE: SCEV disabled to ensure the live operation is not removed before
9 #define LIVELOOP(RET) \
10 __attribute__ ((noinline)) int \
11 liveloop##RET (int n, int *x, int *y) \
14 for (j = 0; j < n; ++j) \
19 y[(j*2)+1] = n1 + 2; \
26 typedef int (*FP
)(int n
, int *x
, int *y
);
27 const FP llf
[]= {&liveloop0
, &liveloop1
};
40 for (i
=0; i
<MAX
*2; i
++)
42 __asm__
volatile ("");
48 __asm__
volatile ("");
50 int ret
= llf
[i
] (MAX
, a
, b
);
52 if (ret
!= (MAX
* 2) - 2 + i
)
55 for (i
=0; i
<MAX
*2; i
++)
57 __asm__
volatile ("");
58 if (b
[i
] != i
+ (i
%2) + 1)
64 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */
65 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" } } */
66 /* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 2 "vect" } } */