annotate gcc/testsuite/gcc.dg/tree-ssa/ifc-cd.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
kono
parents:
diff changeset
2 /* { dg-options "-O3 -fdump-tree-ifcvt-details-blocks-details -ftree-loop-if-convert-stores" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 void foo (int *x1, int *x2, int *x3, int *x4, int *y)
kono
parents:
diff changeset
5 {
kono
parents:
diff changeset
6 int i;
kono
parents:
diff changeset
7 int a1, a2, a3, b1, b2;
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 for (i=0; i<128; i++)
kono
parents:
diff changeset
10 {
kono
parents:
diff changeset
11 a1 = x1[i];
kono
parents:
diff changeset
12 a2 = x2[i];
kono
parents:
diff changeset
13 a3 = x3[i];
kono
parents:
diff changeset
14 y[i] = 0;
kono
parents:
diff changeset
15 if (x4[i] == 0)
kono
parents:
diff changeset
16 {
kono
parents:
diff changeset
17 b1 = a1 + 1;
kono
parents:
diff changeset
18 if (a2 > 0)
kono
parents:
diff changeset
19 b1++;
kono
parents:
diff changeset
20 a1++;
kono
parents:
diff changeset
21 if (a3 < 0)
kono
parents:
diff changeset
22 b1--;
kono
parents:
diff changeset
23 y[i] = b1;
kono
parents:
diff changeset
24 }
kono
parents:
diff changeset
25 }
kono
parents:
diff changeset
26 }
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 /* { dg-final { scan-tree-dump-times "Use predicate of bb" 4 "ifcvt" } } */
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 /* We insert into code
kono
parents:
diff changeset
31 if (LOOP_VECTORIZED (...))
kono
parents:
diff changeset
32 which is folded by vectorizer. Both outgoing edges must have probability
kono
parents:
diff changeset
33 100% so the resulting profile match after folding. */
kono
parents:
diff changeset
34 /* { dg-final { scan-tree-dump-times "Invalid sum of outgoing probabilities 200.0" 1 "ifcvt" } } */
kono
parents:
diff changeset
35 /* Sum is wrong here, but not enough for error to be reported. */
kono
parents:
diff changeset
36 /* { dg-final { scan-tree-dump-times "Invalid sum of incoming frequencies" 0 "ifcvt" } } */