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

--- Comment #6 from Drea Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 65042
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65042&action=edit
Patch set

This is the patch set.
The first patch is for fold-const to combine_comparisons so that when combining
(a == b || a < b) can be folded into `a <= b`.
The second is ifcombine so that ifcombine can be combine here. Note this
handled seperately and specially due to trapping. 

The third is phiopt handled specially due to trapping. 

Oh and we handle the || case correctly even if invert_tree_comparison returns
ERROR_MARK_NODE.

Note also the 2 and 3rd cases can do something in some cases though not much
due to VRP/DOM/ranger already does handles most cases in the first place.

Reply via email to