Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-lim2-details -fdump-tree-optimized" } */
3
4 extern volatile int *x;
5 static int gCrc;
6
7 static int __attribute__((noinline)) crc16Add(int crc, int b)
8 {
9 return crc + b;
10 }
11
12 void f(int data, int dataSz)
13 {
14 int i;
15
16 for(i=0;i<dataSz;i++)
17 {
18 gCrc = crc16Add(gCrc, data);
19 *x = data;
20 }
21 }
22
23 /* { dg-final { scan-tree-dump "Executing store motion of gCrc" "lim2" } } */
24 /* { dg-final { scan-tree-dump-not "Re-issueing" "lim2" } } */
25 /* { dg-final { scan-tree-dump-times "\\*x" 1 "optimized" } } */