1 /* { dg-do compile } */
2 /* { dg-additional-options "-fdump-tree-optimized-details-blocks" } */
3 /* { dg-require-effective-target vect_int } */
4 /* { dg-require-effective-target vect_float } */
33 for (i
= 0; i
< N
; i
++) {
34 diff
+= (cb
[i
] - cc
[i
]);
41 for (i
= 0; i
< N
; i
++) {
42 for (j
= 0; j
< N
; j
++) {
43 diff
+= (image
[i
][j
] - block
[i
][j
]);
50 for (i
= 0; i
< N
; i
++){
57 for (i
= 0; i
< N
; i
++){
58 a
[i
] = b
[i
] + c
[i
] + d
[i
];
63 /* Strided access. Vectorizable on platforms that support load of strided
64 accesses (extract of even/odd vector elements). */
65 for (i
= 0; i
< N
/2; i
++){
66 a
[i
] = b
[2*i
+1] * c
[2*i
+1] - b
[2*i
] * c
[2*i
];
67 d
[i
] = b
[2*i
] * c
[2*i
+1] + b
[2*i
+1] * c
[2*i
];
73 for (i
= 0; i
< N
; i
++){
76 ia
[i
] = ib
[i
] + ic
[i
];
82 /* Not vetorizable yet (too conservative dependence test). */
83 for (i
= 0; i
< N
; i
++){
90 /* { dg-final { scan-tree-dump-times "vectorized 6 loops" 1 "vect" { target vect_strided2 } } } */
91 /* { dg-final { scan-tree-dump-times "vectorized 5 loops" 1 "vect" { xfail vect_strided2 } } } */
92 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */