Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-10.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-pre-stats" } */
3
4 union loc { unsigned reg; signed offset; };
5 void __frame_state_for (volatile char *state_in, int x)
6 {
7 /* We should move all the loads out of this loop. Right now, we only
8 move one. It takes two insertions because we insert a cast. */
9 union loc fs;
10 int reg;
11 for (;;) {
12 switch (x) {
13 case 0:
14 *state_in = fs.reg;
15 case 1:
16 *state_in = fs.offset;
17 }
18 }
19 }
20
21 /* This is a weird testcase. It should need PPRE to hoist the loop
22 invariants and the volatileness of state_in prevents DSE of the
23 first store. Thus, this is XFAILed. */
24
25 /* { dg-final { scan-tree-dump "Insertions: 2" "pre" { xfail *-*-* } } } */