[Bug tree-optimization/106164] (a > b) & (a >= b) does not get optimized until reassoc1

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jul 30 03:47:49 GMT 2023


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

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #7)
> Created attachment 55657 [details]
> Patch which just needs some testcases
> 
> This simple patch implements what I Mentioned about extending those other
> patterns.

Note this does implement all of what combine_comparisons implements but
implements most of them.
It could easily extend for some more.
Like `x_2 >= y_3 && x_2 != y_3` could be added to convert to `x_2 > y_3`. I
will do that in a different patch.


More information about the Gcc-bugs mailing list