1 /* { dg-require-effective-target vect_int } */
2 /* { dg-require-effective-target vect_int_mult } */
3 /* PR tree-optimization/67682. */
7 int __attribute__((__aligned__(8))) a
[8];
8 int __attribute__((__aligned__(8))) b
[8];
10 __attribute__ ((noinline
)) void
24 main (int argc
, char **argv
)
28 for (int i
= 0; i
< 8; i
++)
30 for (int i
= 0; i
< 8; i
++)
32 __asm__
volatile ("" : : : "memory");
34 __asm__
volatile ("" : : : "memory");
35 if ((a
[0] != 5) || (a
[1] != 7) || (a
[2] != 9) || (a
[3] != 11)
36 || (a
[4] != 12) || (a
[5] != 24) || (a
[6] != 40) || (a
[7] != 70))
41 /* { dg-final { scan-tree-dump-times "Basic block will be vectorized using SLP" 1 "slp2" } } */
42 /* Because we disable the cost model, targets with variable-length
43 vectors can end up vectorizing the store to a[0..7] on its own.
44 With the cost model we do something sensible. */
45 /* { dg-final { scan-tree-dump-times "optimized: basic block" 2 "slp2" { target { ! amdgcn-*-* } xfail { vect_variable_length && { ! vect128 } } } } } */
47 /* amdgcn can do this in one vector. */
48 /* { dg-final { scan-tree-dump-times "optimized: basic block" 1 "slp2" { target amdgcn-*-* } } } */