No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.dg / vect / pr20122.c
blobebb9f42db0c653b7785c284350abcb279abf925a
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
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])
13 int k,i;
14 for (k = 0; k<8; k++)
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])
22 int k,i;
23 short Kernshort2[24] __attribute__ ((__aligned__(16)));
24 for (k = 0; k<8; k++)
25 for (i = 0; i<24; i++)
26 Kernshort2[i] = Kernel[k][i];
28 for (k = 0; k<8; k++)
29 for (i = 0; i<24; i++)
30 if (Kernshort2[i] != Kernel[k][i])
31 abort ();
34 int main (int argc, char **argv)
36 check_vect ();
38 short Kernel[8][24] __attribute__ ((__aligned__(16)));
39 int k,i;
41 for (k = 0; k<8; k++)
42 for (i = 0; i<24; i++)
43 Kernel[k][i] = 0;
45 VecBug(Kernel);
46 VecBug2(Kernel);
48 return 0;
52 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail vect_no_align} } } */
53 /* { dg-final { cleanup-tree-dump "vect" } } */