This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Scev analysing number of loop iterations returns (2^32-1) instead of -1
- From: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- To: Tobias Grosser <grosser at fim dot uni-passau dot de>
- Cc: Richard Guenther <richard dot guenther at gmail dot com>, gcc at gcc dot gnu dot org, graphite <gcc-graphite at googlegroups dot com>, Sebastian Pop <sebpop at gmail dot com>
- Date: Thu, 8 Oct 2009 08:49:18 +0200
- Subject: Re: Scev analysing number of loop iterations returns (2^32-1) instead of -1
- References: <1254933015.52806.32.camel@tobilaptop>
Hi,
> > Ah, indeed. Sorry for being confused. Is tree-niter-desc->assumptions
> > or ->may_be_zero non-NULL?
>
> Yes both. I attached the gdb content for both.
you need to check may_be_zero, which in your case should contain
something like N <= 49. If this condition is true, the number of
iterations of the loop is zero. Please also check the comments
in tree-flow.h, where the possible outcomes of # of iteration analysis
are explained,
Zdenek