Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / costmodel / ppc / costmodel-vect-33.c
blob11036b0bced5b9050fbae6edf03c3481a72dd3d7
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
4 #include <stdarg.h>
5 #include "../../tree-vect.h"
7 #define N 16
8 struct test {
9 char ca[N];
12 extern struct test s;
14 int main1 ()
16 int i;
18 for (i = 0; i < N; i++)
20 s.ca[i] = 5;
23 /* check results: */
24 for (i = 0; i < N; i++)
26 if (s.ca[i] != 5)
27 abort ();
30 return 0;
33 int main (void)
35 return main1 ();
38 /* Peeling to align the store is used. Overhead of peeling is too high. */
39 /* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target vector_alignment_reachable } } } */
41 /* Versioning to align the store is used. Overhead of versioning is not too high. */
42 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target {! vector_alignment_reachable} } } } */
43 /* { dg-final { cleanup-tree-dump "vect" } } */