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

            Bug ID: 111910
           Summary: `a - b < 0` is not transformed into `a < b` for signed
                    types
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: FIXME, missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

>From match.pd:

/* Transform comparisons of the form X - Y CMP 0 to X CMP Y.
   ??? The transformation is valid for the other operators if overflow
   is undefined for the type, but performing it here badly interacts
   with the transformation in fold_cond_expr_with_comparison which
   attempts to synthetize ABS_EXPR.  */

I am looking into that fix that for either GCC 14 or 15.

Reply via email to