https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121382
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=121370
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Tamar Christina from comment #6)
> Looks like because it thinks that
>
> f = f - e;
> if (c - 9 * f) {
> __builtin_abort();
>
> is always true, but misses the obvious case that when c == 0 and e ==
> 2147483647 c will be 0 and stay 0.
>
> This happens because after propagating the initial value of f into the
> expression
>
> f = 2147483647 - e;
> if (c - 9 * f) {
> __builtin_abort();
>
> The following IV candidate is generated
>
> Candidate 7:
> Depend on inv.exprs: 2
> Var befor: ivtmp.12
> Var after: ivtmp.12
> Incr POS: before exit test
> IV struct:
> Type: unsigned int
> Base: (unsigned int) e_8(D) * 9 + (unsigned int) c.0_5
> Step: (unsigned int) (e_8(D) * 9)
it seems to me the step is already problematic - the base is computed
with unsigned arithmetic, but the step is not.
Note SCEV has the long-standing issue that it performs invalid
associations, introducing undefined signed overflow.