https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128918
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
CC| |amacleod at redhat dot com,
| |rguenth at gcc dot gnu.org
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
That got invalid only after improvements to range-info. It's now a bit less
important to aggressively preserve range info as we have ranger, but preserving
points-to info is still important. That was _also_ somewhat flow-sensitive
with it being used to carry non-NULL-ness from VRP possibly in a context
sensitive manner. Very recently that isn't done anymore so we should be able
to safely
copy points-to info.
As the comment notes
/* If this now constitutes a copy duplicate points-to
and range info appropriately. This is especially
important for inserted code. */
if (sprime
&& TREE_CODE (sprime) == SSA_NAME)
maybe_duplicate_ssa_info_at_copy (lhs, sprime);
this is was important for PRE to avoid regressing later passes. But the
function is used from copyprop and forwprop (and VRP) as well, so we have
to get the helper correct.
The idea is that for
_1 = ...;
...
_2 = _1;
in the same BB we copy points-to and ranges from _2 to _1 as we'll eliminate
all uses of _2 by _1.