Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/pr54240.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -misel -fdump-tree-phiopt-details" } */
3
4 typedef struct s {
5 int v;
6 int b;
7 struct s *l;
8 struct s *r;
9 } S;
10
11
12 int foo(S *s)
13 {
14 S *this;
15 S *next;
16
17 this = s;
18 if (this->b)
19 next = this->l;
20 else
21 next = this->r;
22
23 return next->v;
24 }
25
26 /* { dg-final { scan-tree-dump "Hoisting adjacent loads" "phiopt2" } } */