https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126171
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot
gnu.org
Status|NEW |ASSIGNED
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think the issue is that SCEV computes
ay_16 = {ay_32, +, -2147483648}_2
for
<bb 6> [local count: 2088427865]:
# ay_32 = PHI <-1782460880(2), 3(9)>
az:
goto <bb 3>; [100.00%]
<bb 3> [local count: 19522579055]:
# ay_16 = PHI <ay_17(10), ay_32(6)>
...
ay_17 = ay_16 - -2147483648;
goto bb3;
that is, SCEV cannot correctly represent - INT_MIN because to turn that
into PLUS for the CHREC it has to negate it. This means we compute the
wrong direction for the SCEV in get_scev_info.