1 /* { dg-require-effective-target vect_long } */
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)) long \
11 liveloop##RET (int n, long *x, long *y) \
13 long n0, n1, n2, n3; \
15 for (j = 0; j < n; ++j) \
22 y[(j*4)+1] = n1 + 2; \
23 y[(j*4)+2] = n2 + 3; \
24 y[(j*4)+3] = n3 + 4; \
33 typedef long (*FP
)(int n
, long *x
, long *y
);
34 const FP llf
[]= {&liveloop0
, &liveloop1
, &liveloop2
, &liveloop3
};
47 for (i
=0; i
<MAX
*4; i
++)
49 __asm__
volatile ("");
55 __asm__
volatile ("");
57 int ret
= llf
[i
] (MAX
, a
, b
);
59 if (ret
!= (MAX
* 4) - 4 + i
)
62 for (i
=0; i
<MAX
*4; i
++)
64 __asm__
volatile ("");
65 if (b
[i
] != i
+ (i
%4) + 1)
71 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" } } */
72 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { xfail vect_variable_length } } } */
73 /* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 4 "vect" } } */