https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121220

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Sinking doesn't perform any alias disambiguation.  We have

  <bb 2> [local count: 1073741824]:
  _8 = (long unsigned int) &b;
  _9 = (long unsigned int) &a;
  _10 = {_9, _8};
  MEM <vector(2) long unsigned int> [(int & *)&s] = _10;
  _6 = a;
  _7 = b;
  if (_6 < _7)

so no luck here.  Looking at the code it's even more restricted:

  /* If stmt is a store the one and only use needs to be the VOP
     merging PHI node.  */
  if (virtual_operand_p (DEF_FROM_PTR (def_p)))
    {

it has special code to ignore a kill on one path but it would be
confused by the call to bar() as well.

This can probably be reasonably "easy" improved to get to a single
relevant virtual use (either the PHI arg on the edge to sink to
or as in this case the call).

Reply via email to