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

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 #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
The sinking opportunity is a secondary one, sink does

Sinking # .MEM_8 = VDEF <.MEM_4(D)>
*p_5(D) = _1;
 from bb 2 to bb 5

but then not sinking further with the store commoning I implemented for GCC 11.

  <bb 2> [local count: 1073741824]:
  u_6 = *p_5(D);
  _1 = u_6 + x_7(D);
  if (_1 < u_6)
    goto <bb 3>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 536870912]:
  *p_5(D) = _1;
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 536870913]:
  _2 = _1 + 1;
  *p_5(D) = _2;

  <bb 4> [local count: 1073741824]:
  # prephitmp_11 = PHI <_1(5), _2(3)>
  return prephitmp_11;

regular sinking works up the postdom tree.  In reality we'd have to iterate
sinking and commoning as can be seen here given we're lazy and not computing
a combined dataflow.

Reply via email to