Debian Codegraph @

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

raw
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-fdump-tree-optimized-details-blocks" } */
3
4 #include <stdarg.h>
5 #include "tree-vect.h"
6
7 #define N 16
8
9 char cb[N] = {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
10 char cc[N] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
11
12 __attribute__ ((noinline)) int
13 main1 (void)
14 {
15 int i;
16 int diff = 0;
17
18 /* Cross-iteration cycle. */
19 diff = 0;
20 for (i = 0; i < N; i++) {
21 diff += (cb[i] - cc[i]);
22 }
23
24 /* Check results. */
25 if (diff != 16)
26 abort();
27
28 return 0;
29 }
30
31 int main (void)
32 {
33 check_vect ();
34 return main1 ();
35 }
36
37 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_unpack } } } */
38
39
40 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */