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

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

https://gcc.gnu.org/g:78280307c78ead38264933c2b524b7e38674cf54

commit r17-89-g78280307c78ead38264933c2b524b7e38674cf54
Author: Andrew Pinski <[email protected]>
Date:   Tue Feb 10 09:41:48 2026 -0800

    scev/niter: Use INTEGRAL_NB_TYPE_P instead of direct comparison to
INTEGER_TYPE [PR124061]

    I noticed this while looking into PR 124052. This is not the first time we
had
    direct type comparison against INTEGER_TYPE which should have been
different.
    As mention in PR 124052, I didn't include bool types so I needed a new
macro
    to simplify things.

    Bootstrapped and tested on x86_64-linux-gnu.

            PR tree-optimization/124061

    gcc/ChangeLog:

            * tree-scalar-evolution.cc (interpret_rhs_expr): Use
            INTEGRAL_NB_TYPE_P instead of comparing the code to INTEGER_TYPE.
            * tree-ssa-loop-niter.cc (number_of_iterations_ne): Likewise.
            (number_of_iterations_cltz): Likewise.
            (number_of_iterations_exit_assumptions): Likewise.
            * tree.h (INTEGRAL_NB_TYPE_P): New macro.

    gcc/testsuite/ChangeLog:

            * g++.dg/opt/enum-loop-1.C: New test.
            * gcc.dg/tree-ssa/bitint-loop-opt-1.c: New test.

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

Reply via email to