Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-26.c

raw
1 /* Disabling epilogues until we find a better way to deal with scans. */
2 /* { dg-additional-options "--param vect-epilogues-nomask=0 -fdump-tree-optimized-details-blocks" } */
3 /* { dg-require-effective-target vect_int } */
4
5 #include <stdarg.h>
6 #include "tree-vect.h"
7
8 #define N 128
9
10 /* unaligned store. */
11
12 __attribute__ ((noinline))
13 int main1 ()
14 {
15 int i;
16 int ia[N+1];
17
18 for (i = 1; i <= N; i++)
19 {
20 ia[i] = 5;
21 }
22
23 /* check results: */
24 #pragma GCC novector
25 for (i = 1; i <= N; i++)
26 {
27 if (ia[i] != 5)
28 abort ();
29 }
30
31 return 0;
32 }
33
34 int main (void)
35 {
36 check_vect ();
37
38 return main1 ();
39 }
40
41 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
42 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */
43 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_element_align_preferred || { ! vect_align_stack_vars } } } } } */
44 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */