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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-11-10
          Component|c                           |tree-optimization
     Ever confirmed|0                           |1
      Known to fail|                            |6.0

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Without the unreachable PHI-OPT will host the loads (via hoist_adjacent_loads)
but not with it.  Thus we end up with the if-convertible

  <bb 2>:
  _5 = foo_4(D)->a;
  _6 = foo_4(D)->b;
  if (side_2(D) == 0)
    goto <bb 4>;
  else
    goto <bb 3>;

  <bb 3>:

  <bb 4>:
  # _1 = PHI <_5(2), _6(3)>

compared to

  <bb 2>:
  if (side_2(D) == 0)
    goto <bb 3>;
  else
    goto <bb 4>;

  <bb 3>:
  _5 = foo_4(D)->a;
  goto <bb 5>;

  <bb 4>:
  _6 = foo_4(D)->b;

  <bb 5>:
  # _1 = PHI <_5(3), _6(4)>

which is not if-convertible (by RTL if-conversion which doesn't perform this
trick itself).

Reply via email to