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



--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-11-02 
20:51:31 UTC ---

Actually not, what happen here is that we unroll the loop 17 times based on the

fact that the array access iterates from taillen to tailen+n_iterations and the

array size is 17.



Later in compilation we prove that tailen is actually non-zero by VRP and we

work the hard way across the unrolled loop body to work out that the last

access must be out of bounds.



So this is not bug of unroller to not remove statement. Short of teaching SCEV

about the value range of initial tailen, we really can't reduce number of

iterations.



We discussed it here http://gcc.gnu.org/ml/gcc-patches/2012-10/msg01103.html



I do not think we really can solve these cases reliably short of silencing the

warning on unrolled loop copies and other duplicated statements.

Reply via email to