https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61734
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |ebotcazou at gcc dot gnu.org --- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > So perhaps teach fold also about A CMP B ? A - B : -(A - B) etc.? Then it > will handle this idiom even if the user writes it that way in the source. Interesting idea, although it doesn't fit into fold_cond_expr_with_comparison. Maybe the X - Y CMP 0 to X CMP Y transformation should simply be disabled again (except for EQ/NE) and the missing comment giving the rationale for this added.