1 /* { dg-require-effective-target vect_int } */
26 for (i
= 0; i
< N
; i
++)
28 res
[i
].c
= ptr
->c
+ ptr
->c
;
29 res
[i
].a
= ptr
->a
+ ptr
->a
;
30 res
[i
].d
= ptr
->d
+ ptr
->d
;
31 res
[i
].b
= ptr
->b
+ ptr
->b
;
32 res
[i
].f
= ptr
->f
+ ptr
->f
;
33 res
[i
].e
= ptr
->e
+ ptr
->e
;
34 res
[i
].h
= ptr
->h
+ ptr
->h
;
35 res
[i
].g
= ptr
->g
+ ptr
->g
;
40 for (i
= 0; i
< N
; i
++)
42 if (res
[i
].c
!= arr
[i
].c
+ arr
[i
].c
43 || res
[i
].a
!= arr
[i
].a
+ arr
[i
].a
44 || res
[i
].d
!= arr
[i
].d
+ arr
[i
].d
45 || res
[i
].b
!= arr
[i
].b
+ arr
[i
].b
46 || res
[i
].f
!= arr
[i
].f
+ arr
[i
].f
47 || res
[i
].e
!= arr
[i
].e
+ arr
[i
].e
48 || res
[i
].h
!= arr
[i
].h
+ arr
[i
].h
49 || res
[i
].g
!= arr
[i
].g
+ arr
[i
].g
)
54 for (i
= 0; i
< N
; i
++)
56 res
[i
].c
= ptr
->c
+ ptr
->c
;
57 res
[i
].a
= ptr
->a
+ ptr
->a
;
58 res
[i
].d
= ptr
->d
+ ptr
->d
;
59 res
[i
].b
= ptr
->b
+ ptr
->b
;
60 res
[i
].f
= ptr
->f
+ ptr
->f
;
61 res
[i
].e
= ptr
->e
+ ptr
->e
;
62 res
[i
].h
= ptr
->e
+ ptr
->e
;
63 res
[i
].g
= ptr
->g
+ ptr
->g
;
68 for (i
= 0; i
< N
; i
++)
70 if (res
[i
].c
!= arr
[i
].c
+ arr
[i
].c
71 || res
[i
].a
!= arr
[i
].a
+ arr
[i
].a
72 || res
[i
].d
!= arr
[i
].d
+ arr
[i
].d
73 || res
[i
].b
!= arr
[i
].b
+ arr
[i
].b
74 || res
[i
].f
!= arr
[i
].f
+ arr
[i
].f
75 || res
[i
].e
!= arr
[i
].e
+ arr
[i
].e
76 || res
[i
].h
!= arr
[i
].e
+ arr
[i
].e
77 || res
[i
].g
!= arr
[i
].g
+ arr
[i
].g
)
90 for (i
= 0; i
< N
; i
++)
100 asm volatile ("" ::: "memory");
108 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { vect_strided8 && { ! { vect_no_align} } } } } } */
109 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! { vect_strided8 || vect_no_align } } } } } */
110 /* We fail to vectorize the second loop with variable-length SVE but
111 fall back to 128-bit vectors, which does use SLP. */
112 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { ! vect_perm } } } } */
113 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target vect_perm } } } */