------- Comment #22 from rakdver at gcc dot gnu dot org  2006-05-02 07:56 
-------
(In reply to comment #14)
> Hmm, I wonder if the following loop in scev_probably_wraps_p is wrong.
> 
>   estimate_numbers_of_iterations_loop (loop);
>   for (bound = loop->bounds; bound; bound = bound->next)
>     if (proved_non_wrapping_p (at_stmt, bound, type, valid_niter))
>       return false;
> 
> it says that if one bounds does not wrap, then all variables asked about don't
> which is not true.

this piece of code seems OK to me (modulo that proved_non_wrapping_p was quite
missleading way to name that function).  What it does is that we know that the
loop is executed at most BOUND times, and that the variable will not wrap for
at least VALID_NITER iterations; therefore, if we are able to prove that
VALID_NITER > BOUND for any of the bounds, we know that the variable does not
wrap.  There is probaby off-by-one error in one of the functions.


-- 

rakdver at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rakdver at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-04-11 23:17:57         |2006-05-02 07:56:20
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26304

Reply via email to