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

--- Comment #11 from Drea Pinski <pinskia at gcc dot gnu.org> ---
The problem here we have:
```
  <bb 2> [local count: 1073741824]:
  if (a_3(D) u>= b_4(D))
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870912]:
  _6 = a_3(D) < b_4(D);

  <bb 4> [local count: 1073741824]:
  # _8 = PHI <1(2), _6(3)>
```

Which is:
!(a u>= b) || (a_3(D) < b_4(D))

That is very similar to what we have in PR 126295.
combine_comparisons don't support inverting as part of the thing here.

And invert_tree_comparison returns ERROR_MARK_NODE because the invert of `a u>=
b` is `a < b` but > traps while u>= does not.

I think I know how to handle this. Basically invert_tree_comparison needs an
extra argument where we can ignore trapping difference for phiopt/ifcombine
since we are already doing the combining with a possible trapping case. Though
only for `||` and only in the outer condition.

Reply via email to