http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57511

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spop at gcc dot gnu.org
             Blocks|                            |55555

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
analyze_scalar_evolution_in_loop fails for a_4 in

  <bb 4>:
  # i_11 = PHI <i_5(3), 0(2)>
  # a_12 = PHI <a_4(3), 0(2)>
  _3 = i_11 + 16711935;
  a_4 = _3 + a_12;
  i_5 = i_11 + 1;
  if (i_5 != 10)
    goto <bb 3>;
  else
    goto <bb 5>;

  <bb 5>:
  # a_6 = PHI <a_4(4)>
  return a_6;

the evolution is {16711935, +, _3 + 1}_1 but the evolution of _3
is { 16711935, +, 1 }_1 and { 16711935, +, { 16711935, +, 1 }_1 + 1}_1
isn't a valid evolution.  Even though 4.7 computed:

(chrec_apply
  (varying_loop = 1
)
  (chrec = {16711935, +, {16711936, +, 1}_1}_1)
  (x = 9)
  (res = 167119395))

this is probably caused by the fix for PR55555.

I will experiment with relaxing it a bit tomorrow.  But the question
remains(?), is

  { 16711935, +, { 16711935, +, 1 }_1 + 1}_1

a valid scalar evolution?

Reply via email to