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

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |17.0
             Status|NEW                         |RESOLVED

--- Comment #4 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Drea Pinski from comment #3)
> (In reply to Richard Biener from comment #2)
> > This looks more like missed backward jump-threading, I wouldn't add this to
> > phiprop, duplicating control flow is ... ugly?
> 
> I guess that is more correct. Maybe this is a simple one for Aldy to handle.

Fixed by a few patches already in GCC 17.
ethread does:
  <bb 2> :
  if (a_5(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # p_15 = PHI <&L0(2)>
  # b_13 = PHI <3(2)>
  goto <bb 5>; [100.00%]

  <bb 4> :
  # p_10 = PHI <&L1(2)>
  # b_9 = PHI <5(2)>
  goto <bb 6>; [100.00%]

Reply via email to