[Bug tree-optimization/26406] Fowardprop does harm for VRP to figure out if a point is non zero

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Feb 22 20:55:00 GMT 2006



------- Comment #11 from rguenth at gcc dot gnu dot org  2006-02-22 20:55 -------
So I suppose VRP cannot see "backwards" for

  i_2 = j_1;
  if (i_2 == 0)
    return j_1;

?  (of course copyprop would clean this up, but suppose for a moment this
gets to VRP)

If it can see that i_1 is zero at the point of the return statement then we
can teach VRP to take

  a_1 = (T *)x_1;

simply as copy, canonicalizing all pointer types to (void*) for the sake
of VRP (which would also avoid generating extra permanent integer constants
with various types in the pool).


-- 


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



More information about the Gcc-bugs mailing list