This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]