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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2025-11-25
                 CC|                            |pinskia at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
  <bb 2> [local count: 1073741824]:
  if (a_2(D) > b_3(D))
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870912]:

  <bb 4> [local count: 1073741824]:
  # __m_7 = PHI <a_2(D)(3), b_3(D)(2)>
  # __M_6 = PHI <b_3(D)(3), a_2(D)(2)>
  # prephitmp_17 = PHI <1(3), 18446744073709551615(2)>
  _8 = __M_6 - __m_7;
  _9 = _8 >> 1;
  _10 = _9 * prephitmp_17;
  _11 = a_2(D) + _10;
  return _11;

so we miss max/min detection and a > b ? 1 : -1 is not if-converted either.

But possibly the whole thing needs to be pattern-matched?

Reply via email to