PR tree-optimization/33562
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / gen-vect-11.c
blobbb5f248a62272a0538b6f52221c83235446167bd
1 /* { dg-do run { target vect_cmdline_needed } } */
2 /* { dg-options "-O2 -ftree-vectorize -fwrapv -fdump-tree-vect-details -fvect-cost-model=dynamic" } */
3 /* { dg-options "-O2 -ftree-vectorize -fwrapv -fdump-tree-vect-details -fvect-cost-model=dynamic -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
5 #include <stdlib.h>
7 #define N 16
9 char ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
10 char ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
12 int main ()
14 int i;
15 char ia[N];
17 for (i = 0; i < N; i++)
19 ia[i] = ib[i] + ic[i];
22 /* check results: */
23 for (i = 0; i < N; i++)
25 if (ia[i] != ib[i] + ic[i])
26 abort ();
29 return 0;
33 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! avr-*-* } } } } */