https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117574
Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
So before IVCANON we have a loop-header copy that will enter the loop:

if (_8 >= _10) // 76 >= 40
  goto <bb 13>; [89.00%] // enter loop
else
  goto <bb 7>; [11.00%] // skip it

and the first loop jump 

<bb 6> [local count: 955630224]:
# g_33 = PHI <g_21(15), _10(13)>
# b_lsm.12_28 = PHI <_20(15), b_lsm.12_30(13)>
_20 = b_lsm.12_28 + g_33;
g_21 = g_33 + 50;
if (_8 >= g_21)  // 76 >= 90
  goto <bb 15>; [89.00%]  // loop
else
  goto <bb 17>; [11.00%]  // exit

should exit the loop.  We enter number_of_iterations_lt with

{ (long int) ((int) d.3_5 + 40) + 50, +, 50 } and (long int) ((int) d.3_5 + 76)
+ 1

computing delta == 18446744073709551603 (aka -13u) and then
number_of_iterations_lt_to_ne computes we can convert this to NE with
a final value of 34 and a { 0, +, 50 } IV.  I will dig further.

Reply via email to