This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/55011] [4.8 Regression] GCC in an infinite loop at -O2 in VRP


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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-22 09:26:26 UTC ---
I bet this regressed with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189885
together with one of r188728, r188776 or r188780 (in between r188700 and
r188800
it started to ICE, and with r189885 it started to loop infinitely instead of
ICEing).
If you want to iterate one more time, I think it would be better to ensure you
iterate just one more time and not infinitely.
Perhaps we could abuse for that the vr_phi_edge_counts array, if
  if (edges > 0
      && gimple_phi_num_args (phi) > 1
      && lhs_vr->type == VR_UNDEFINED)
    {
      if (edges == old_edges)
        /* Iterate one more time, but ensure next time we drop to varying
           instead of looping forever.  */
        vr_phi_edge_counts[SSA_NAME_VERSION (lhs)] = -edges;
      else if (edges == -old_edges)
        goto varying;
    }

before the
  if (edges > 0
      && gimple_phi_num_args (phi) > 1
      && edges == old_edges
      && lhs_vr->type != VR_UNDEFINED)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]