annotate gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-8.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
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 "-O2 -fno-tree-dominator-opts -fdump-tree-fre1-stats" } */
kono
parents:
diff changeset
3 struct s {
kono
parents:
diff changeset
4 int *n;
kono
parents:
diff changeset
5 };
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 int
kono
parents:
diff changeset
8 foo (__SIZE_TYPE__ i, struct s *array)
kono
parents:
diff changeset
9 {
kono
parents:
diff changeset
10 int *p = array[i].n;
kono
parents:
diff changeset
11 if (p)
kono
parents:
diff changeset
12 {
kono
parents:
diff changeset
13 int *q = array[i].n;
kono
parents:
diff changeset
14 if (p != q)
kono
parents:
diff changeset
15 return 1;
kono
parents:
diff changeset
16 }
kono
parents:
diff changeset
17 return 0;
kono
parents:
diff changeset
18 }
kono
parents:
diff changeset
19 /* We should eliminate two address calculations, and one load. */
kono
parents:
diff changeset
20 /* We also elimiate the PHI node feeding the return because the case
kono
parents:
diff changeset
21 returning 1 is unreachable. */
kono
parents:
diff changeset
22 /* We used to eliminate a cast but that was before POINTER_PLUS_EXPR
kono
parents:
diff changeset
23 was added. */
kono
parents:
diff changeset
24 /* { dg-final { scan-tree-dump-times "Eliminated: 4" 1 "fre1"} } */