https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126171
--- Comment #4 from Andrew Macleod <amacleod at redhat dot com> ---
The PHI analyzer determines that the possible values of the `ay_16` PHI group
are:
{-1782460880, 3, 365022768}
This appears correct: `-1782460880 - INT_MIN` produces `365022768` on the next
iteration.
However, the loop range for `ay_16` is reported as `[-INF, 3]`. It is not clear
why `3` is considered an upper bound, since `365022768` is a valid value
produced by the recurrence. Intersecting the PHI analyzer result with this loop
range removes `365022768`, resulting in the incorrect global range
`{-1782460880, 3}`.
Loops range found for ay_16: [irange] int [-INF, 3] and calculated range
:[irange] int [-1782460880, -1782460880][3, 3][365022768, 365022768]
Global Exported: ay_16 = [irange] int [-1782460880, -1782460880][3, 3]
This incorrect range is then propagated to `ay_19`, excluding the value
`365022768` that occurs on the actual execution path.
Why is the loop range for `ay_16` being calculated as `[-INF, 3]`? is there
possibly an issue with the loop bump being - MIN_INT? it seems to be missing
the true upper bound?