Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-15.c

raw
1 /* PR/101293 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-lim2-details" } */
4
5 struct X { int i; int j; };
6
7 void foo(struct X *x, int n)
8 {
9 for (int i = 0; i < n; ++i)
10 {
11 int *p = &x->j;
12 int tem = *p;
13 x->j += tem * i;
14 }
15 }
16
17 /* Make sure LIM can handle unifying MEM[x, 4] and MEM[x].j */
18 /* { dg-final { scan-tree-dump "Executing store motion" "lim2" } } */