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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the

  if (__x.7_6 < __y.8_7)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 38463891]:
  if (__x.7_6 > __y.8_7)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

fails to merge to != because at the time we run ifcombine it still looks like

  _4 = _3 > "hello";
  _5 = __builtin_constant_p (_4);
  if (_5 != 0)
    goto <bb 4>; [34.00%]
  else
    goto <bb 3>; [66.00%]

  <bb 3> [local count: 708669605]:
  __x.5_6 = (long unsigned int) "hello";
  __y.6_7 = (long unsigned int) _3;
  _8 = __x.5_6 < __y.6_7;

  <bb 4> [local count: 1073741824]:
  # _9 = PHI <_4(2), _8(3)>
  if (_9 != 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 536870913]:
  _10 = _3 < "hello";
  _11 = __builtin_constant_p (_10);
  if (_11 != 0)
    goto <bb 7>; [34.00%]
  else
    goto <bb 6>; [66.00%]

  <bb 6> [local count: 354334802]:
  __x.5_12 = (long unsigned int) _3;
  __y.6_13 = (long unsigned int) "hello";
  _14 = __x.5_12 < __y.6_13;

  <bb 7> [local count: 536870913]:
  # _15 = PHI <_10(5), _14(6)>
  if (_15 != 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 9>; [50.00%]

but maybe that is what Jakubs patch fixes.

Reply via email to