http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55875
--- Comment #4 from rakdver at iuuk dot mff.cuni.cz 2013-01-07 14:09:18 UTC --- > this is correct, since it is done in unsigned int. > Next we do: > res = chrec_convert (type, chrec1, at_stmt); > Eventually we go to convert_affine_scev and we set enforce_overflow_semantics > enforce_overflow_semantics = (use_overflow_semantics > && nowrap_type_p (type)); > > This test looks backwards to me. If the type is nowrap, we do not need to > enforce anything about overflows, when it is wrap, then we have to. The test is correct -- here, type is the type we are converting to; so, if the type is nowrap, we have to make sure that the conversion is not creating an overflowing iv. Anyway, that is irrelevant to the problem: the check of scev_probably_wraps_p below should return false -- which is probably what got broken by the #of iterations estimation change. Zdenek