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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrea Pinski <[email protected]>:

https://gcc.gnu.org/g:bbc2517fe41307a8ce21ca9b96d6660e1e842abf

commit r17-4001-gbbc2517fe41307a8ce21ca9b96d6660e1e842abf
Author: Andrea Pinski <[email protected]>
Date:   Tue Aug 11 12:23:49 2026 -0700

    match/fold: Add LT/GT/LE/GE to combine_comparisons [PR117193]

    This adds the rest of the simple comparisons to combine_comparisons.
    This should be make it easier to support a&~b for phiopt and ifcombine.
    Since `a > b` for booleans is `a & !b`.

    Changes since v1:
    * v2: Update for the new sytax of the match pattern. Also update for the
    operators.
    * v3: Update for the newer syntax.

    Bootstrapped and tested on x86_64-linux-gnu.

            PR tree-optimization/117193

    gcc/ChangeLog:

            * fold-const.cc (combine_comparisons): Add support
            for LT, GT, LE, and GE.
            * match.pd (`(a CMP0 b) OP (a OP1 b)`): Change to use
simple_comparison
            instead of eq/ne.

    gcc/testsuite/ChangeLog:

            * gcc.dg/tree-ssa/cmple-1.c: New test.

    Signed-off-by: Andrea Pinski <[email protected]>

Reply via email to