1 /* { dg-require-effective-target vect_float } */
4 #include "../../tree-vect.h"
13 /* Should be vectorized. Fixed misaligment in the inner-loop. */
14 /* Currently not vectorized because we get too many BBs in the inner-loop,
15 because the compiler doesn't realize that the inner-loop executes at
16 least once (cause k<4), and so there's no need to create a guard code
17 to skip the inner-loop in case it doesn't execute. */
18 __attribute__ ((noinline
)) void foo (){
22 for (i
= 0; i
< N
; i
++) {
26 for (k
= 0; k
< 4; k
++) {
27 for (i
= 0; i
< N
; i
++) {
29 for (j
= k
; j
< M
; j
+=4) {
30 diff
+= in
[j
+i
]*coeff
[j
];
37 /* Vectorized. Changing misalignment in the inner-loop. */
38 __attribute__ ((noinline
)) void fir (){
42 for (i
= 0; i
< N
; i
++) {
44 for (j
= 0; j
< M
; j
++) {
45 diff
+= in
[j
+i
]*coeff
[j
];
58 for (i
= 0; i
< M
; i
++)
60 for (i
= 0; i
< N
+M
; i
++)
66 for (i
= 0; i
< N
; i
++) {
67 if (out
[i
] != fir_out
[i
])
74 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail *-*-* } } } */
75 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
76 /* { dg-final { cleanup-tree-dump "vect" } } */