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

--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
#include <compare>
bool k(int a, int b){
  auto c = (a <=> b);
  return c>0;
}

Produces

  <bb 2> [local count: 1073741824]:
  if (a_1(D) == b_3(D))
    goto <bb 5>; [34.00%]
  else
    goto <bb 3>; [66.00%]

  <bb 3> [local count: 708669601]:
  if (a_1(D) < b_3(D))
    goto <bb 5>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 4> [local count: 354334801]:

  <bb 5> [local count: 1073741824]:
  # prephitmp_8 = PHI <0(2), 0(3), 1(4)>
  return prephitmp_8;

from PRE (or the proposed patch) where it is not matched further.  This kind
of patters could be handled by phiopt.

Reply via email to