1 /* Disabling epilogues until we find a better way to deal with scans. */
2 /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
3 /* { dg-require-effective-target vect_long } */
4 /* { dg-additional-options "-fno-tree-scev-cprop" } */
8 /* Statement in SLP vectorization used outside the loop.
9 NOTE: SCEV disabled to ensure the live operation is not removed before
11 #define LIVELOOP(RET) \
12 __attribute__ ((noinline)) long \
13 liveloop##RET (int n, long *x, long *y) \
15 long n0, n1, n2, n3; \
17 for (j = 0; j < n; ++j) \
24 y[(j*4)+1] = n1 + 2; \
25 y[(j*4)+2] = n2 + 3; \
26 y[(j*4)+3] = n3 + 4; \
35 typedef long (*FP
)(int n
, long *x
, long *y
);
36 const FP llf
[]= {&liveloop0
, &liveloop1
, &liveloop2
, &liveloop3
};
49 for (i
=0; i
<MAX
*4; i
++)
51 __asm__
volatile ("");
58 __asm__
volatile ("");
60 int ret
= llf
[i
] (MAX
, a
, b
);
62 if (ret
!= (MAX
* 4) - 4 + i
)
66 for (i
=0; i
<MAX
*4; i
++)
68 __asm__
volatile ("");
69 if (b
[i
] != i
+ (i
%4) + 1)
75 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" } } */
76 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { xfail vect_variable_length } } } */
77 /* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 4 "vect" } } */