1 /* { dg-require-effective-target vect_int } */
6 short Kernshort
[24] __attribute__ ((__aligned__(16)));
7 static void VecBug(short Kernel
[8][24]) __attribute__((noinline
));
8 static void VecBug2(short Kernel
[8][24]) __attribute__((noinline
));
10 /* Not vectorizable: Kernel may alias Kernshort - a global array. */
11 static void VecBug(short Kernel
[8][24])
15 for (i
= 0; i
<24; i
++)
16 Kernshort
[i
] = Kernel
[k
][i
];
19 /* Vectorizable: Kernshort2 is local. */
20 static void VecBug2(short Kernel
[8][24])
23 short Kernshort2
[24] __attribute__ ((__aligned__(16)));
25 for (i
= 0; i
<24; i
++)
26 Kernshort2
[i
] = Kernel
[k
][i
];
29 for (i
= 0; i
<24; i
++)
30 if (Kernshort2
[i
] != Kernel
[k
][i
])
34 int main (int argc
, char **argv
)
38 short Kernel
[8][24] __attribute__ ((__aligned__(16)));
42 for (i
= 0; i
<24; i
++)
52 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail vect_no_align} } } */
53 /* { dg-final { cleanup-tree-dump "vect" } } */