annotate gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-10.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +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 -fdump-tree-pre-stats" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 union loc { unsigned reg; signed offset; };
kono
parents:
diff changeset
5 void __frame_state_for (volatile char *state_in, int x)
kono
parents:
diff changeset
6 {
kono
parents:
diff changeset
7 /* We should move all the loads out of this loop. Right now, we only
kono
parents:
diff changeset
8 move one. It takes two insertions because we insert a cast. */
kono
parents:
diff changeset
9 union loc fs;
kono
parents:
diff changeset
10 int reg;
kono
parents:
diff changeset
11 for (;;) {
kono
parents:
diff changeset
12 switch (x) {
kono
parents:
diff changeset
13 case 0:
kono
parents:
diff changeset
14 *state_in = fs.reg;
kono
parents:
diff changeset
15 case 1:
kono
parents:
diff changeset
16 *state_in = fs.offset;
kono
parents:
diff changeset
17 }
kono
parents:
diff changeset
18 }
kono
parents:
diff changeset
19 }
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 /* This is a weird testcase. It should need PPRE to hoist the loop
kono
parents:
diff changeset
22 invariants and the volatileness of state_in prevents DSE of the
kono
parents:
diff changeset
23 first store. Thus, this is XFAILed. */
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 /* { dg-final { scan-tree-dump "Insertions: 2" "pre" { xfail *-*-* } } } */