Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-strided-store-u32-i2.c
blob2c5a9994b087c11cf6f8f70811b3b4059f84ced8
1 /* { dg-require-effective-target vect_float } */
3 #include <stdarg.h>
4 #include <stdio.h>
5 #include "tree-vect.h"
7 #define N 16
9 __attribute__ ((noinline)) int
10 main1 (void)
12 int i;
13 int a[N*2];
14 int b[N] = {0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30};
15 int c[N] = {1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31};
17 /* Strided access pattern. */
18 for (i = 0; i < N/2; i++)
20 a[i*2] = b[i] + c[i];
21 a[i*2+1] = b[i] * c[i];
24 /* Check results. */
25 for (i = 0; i < N/2; i++)
27 if (a[i*2] != b[i] + c[i]
28 || a[i*2+1] != b[i] * c[i])
29 abort();
32 return 0;
35 int main (void)
37 check_vect ();
38 return main1 ();
41 /* Needs interleaving support. */
42 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_interleave } } } } */
43 /* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { xfail { vect_interleave } } } } */
44 /* { dg-final { cleanup-tree-dump "vect" } } */