[Bug tree-optimization/26939] New: PRE confuses loop number of iterations analysis
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Mar 30 11:06:00 GMT 2006
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-sccp-details" } */
void bar(int);
void foo(int i1, int j1)
{
int i, j;
for (j=0; j<=j1; ++j)
for (i=0; i<=i1; ++i)
bar(j+1);
}
/* { dg-final { scan-tree-dump-not "set_nb_iterations_in_loop = scev_not_known"
"sccp"} } */
/* { dg-final { cleanup-tree-dump "sccp" } } */
Compare to using j-1 in the inner loop, which makes # iterations analysis
succeed.
--
Summary: PRE confuses loop number of iterations analysis
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26939
More information about the Gcc-bugs
mailing list