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) \
13 int n0, n1, n2, n3, j; \
14 for (j = 0; j < n; ++j) \
21 y[(j*4)+1] = n1 + 2; \
22 y[(j*4)+2] = n2 + 3; \
23 y[(j*4)+3] = n3 + 4; \
32 typedef int (*FP
)(int n
, int *x
, int *y
);
33 const FP llf
[]= {&liveloop0
, &liveloop1
, &liveloop2
, &liveloop3
};
46 for (i
=0; i
<MAX
*4; i
++)
48 __asm__
volatile ("");
54 __asm__
volatile ("");
56 int ret
= llf
[i
] (MAX
, a
, b
);
58 if (ret
!= (MAX
* 4) - 4 + i
)
61 for (i
=0; i
<MAX
*4; i
++)
63 __asm__
volatile ("");
64 if (b
[i
] != i
+ (i
%4) + 1)
70 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" } } */
71 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" } } */
72 /* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 4 "vect" } } */