https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113265
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Started with r8-4394-g81bd903a6aa903 which added the `-(a - b)` -> `b - a` simplification to match. Anyways I am going to fix this for GCC 15. Note /* (A - B) == 0 ? (A - B) : (B - A) same as (B - A) */ Could be represented via: @0 == 0 ? @0 : (maybe_neg @1) if (expr_is_negative (@0, @1)) ... Too. This would be merged into: /* A == 0 ? A : -A same as -A */ even.