Scev analysing number of loop iterations returns (2^32-1) instead of -1

Zdenek Dvorak rakdver@kam.mff.cuni.cz
Thu Oct 8 06:54:00 GMT 2009


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



More information about the Gcc mailing list