This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/26939] New: PRE confuses loop number of iterations analysis
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Mar 2006 11:06:41 -0000
- Subject: [Bug tree-optimization/26939] New: PRE confuses loop number of iterations analysis
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
/* { 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