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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
                 CC|                            |amacleod at redhat dot com
     Ever confirmed|0                           |1
          Component|c                           |tree-optimization
   Last reconfirmed|                            |2022-07-29
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
For the failing case we see

  <bb 2> :
  if (c_5(D) == s_6(D))
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 3> :
  if (c_5(D) != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 4> :
  if (s_6(D) != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

and we basically fail to thread 2->3->4->6, eliminating the if (s_6(D) != 0)
branch when c_5(D) == s_6(D) and c_5(D) == 0.

It looks like relations / equivalences related, but maybe not exactly.  Andrew?

Reply via email to