PR target/55146
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / slp-25.c
blobe5e5e3bdfa6b172cb6a9c9d1a9f6a04d2e669fe1
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 128
8 /* Unaligned stores. */
10 int ia[N+2];
11 short sa[N+2];
13 int main1 (int n)
15 int i;
17 for (i = 1; i <= N/2; i++)
19 ia[2*i] = 25;
20 ia[2*i + 1] = 5;
23 /* check results: */
24 for (i = 1; i <= N/2; i++)
26 if (ia[2*i] != 25
27 || ia[2*i + 1] != 5)
28 abort ();
31 for (i = 1; i <= n/2; i++)
33 sa[2*i] = 25;
34 sa[2*i + 1] = 5;
37 /* check results: */
38 for (i = 1; i <= n/2; i++)
40 if (sa[2*i] != 25
41 || sa[2*i + 1] != 5)
42 abort ();
46 return 0;
49 int main (void)
52 check_vect ();
54 return main1 (N);
57 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
58 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
59 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_no_align || { ! vect_natural_alignment } } } } } */
60 /* { dg-final { cleanup-tree-dump "vect" } } */