[Bug tree-optimization/55875] [4.8 Regression] IVopts caused miscompilation

hubicka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jan 7 17:08:00 GMT 2013


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

--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> 2013-01-07 17:07:57 UTC ---
OK, I understnad the issue now.  It is bug caused by my patch indeed.
The problem is logic in scev_probably_wraps_p that is trying to prove that
given IV at given STMT is not wrapping based on loop bounds connected.
When I was extending loop bounds to contain not only statements that dominate
the exit BB, I verified the walkers that they are valid after the change.
In this case it is however not true. What I missed is that it does two things

1) it tries to prove that STMT is bounded by given bound based on fact that
bound's STMT dominate the statement
2) it tries to prove the bound based on number of iterations of loop that it
derrives from the bounds

2) needs to be updated.  I am testing patch.



More information about the Gcc-bugs mailing list