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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-24 
07:42:26 UTC ---
Dropping all might pessimize some code (of course, this is VR_UNDEFINED, so the
question is if we need to care that much about broken code), like:
int
foo (int x, int y)
{
  int z;
  if (x <= 3)
    return 7;
  if (y)
    z = x;
  return z == x;
}

where the equivalence could be very well kept.  Or
int
foo (int y)
{
  int z;
  int x = bar ();
  if (x <= 3)
    return 7;
  if (y)
    z = x;
  return z == x;
}

In both cases the x_3 in the equivalence bitmap dominates the PHI stmt (in one
case it is the default parm def, in the second case not).  vrp_meet would
probably need to be called with gimple stmt in that case on which the meet
happens.

Anyway, if you think it is overkill, we can just drop the equivalences
altogether.

Reply via email to