Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/sccp-16.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-cunrolli -fdump-tree-sccp-details" } */
3
4 int foo ()
5 {
6 const char *s = "Hello World!";
7 int len = 0;
8 while (s[len])
9 ++len;
10 return len;
11 }
12
13 /* For cunrolli the growth is too large, but it should add a canonical IV
14 and SCCP peform final value replacement. */
15 /* { dg-final { scan-tree-dump "ivtmp\[^\r\n\]*PHI\[^\r\n\]*13" "cunrolli" } } */
16 /* { dg-final { scan-tree-dump "with expr: 12" "sccp" } } */