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

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andrew Macleod <[email protected]>:

https://gcc.gnu.org/g:48923fca19458948d33351b506319efa3af9e40a

commit r16-4616-g48923fca19458948d33351b506319efa3af9e40a
Author: Andrew MacLeod <[email protected]>
Date:   Fri Oct 24 15:09:51 2025 -0400

    Refine COND_EXPR ranges better.

    Recognize COND_EXPRs where there is only one ssa_name used in the
    condition as well as one of the fields in the COND_EXPR.  ie:

      cond = ssa_name < 20
      result = cond ? ssa_name : 20

    Adjust the range of ssa_name to reflect the conditional value of ssa_name
    relative to whether its in the TRUE or FALSE part of the COND_EXPR.

            PR tree-optimization/114025
            gcc/
            * gimple-range-fold.cc (fold_using_range::condexpr_adjust): Handle
            the same ssa_name in the condition and the COND_EXPR better.

            gcc/testsuite/
            * g++.dg/pr114025.C: New.

Reply via email to