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

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Jambor <jamb...@gcc.gnu.org>:

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

commit r15-6769-gd019ab4f115caab48316c185c007765719e93052
Author: Martin Jambor <mjam...@suse.cz>
Date:   Sat Jan 4 20:40:07 2025 +0100

    ipa-cp: Fold-convert values when necessary (PR 118138)

    PR 118138 and quite a few duplicates that it has acquired in a short
    time show that even though we are careful to make sure we do not loose
    any bits when newly allowing type conversions in jump-functions, we
    still need to perform the fold conversions during IPA constant
    propagation and not just at the end in order to properly perform
    sign-extensions or zero-extensions as appropriate.

    This patch does just that, changing a safety predicate we already use
    at the appropriate places to return the necessary type.

    gcc/ChangeLog:

    2025-01-03  Martin Jambor  <mjam...@suse.cz>

            PR ipa/118138
            * ipa-cp.cc (ipacp_value_safe_for_type): Return the appropriate
            type instead of a bool, accept NULL_TREE VALUEs.
            (propagate_vals_across_arith_jfunc): Use the new returned value of
            ipacp_value_safe_for_type.
            (propagate_vals_across_ancestor): Likewise.
            (propagate_scalar_across_jump_function): Likewise.

    gcc/testsuite/ChangeLog:

    2025-01-03  Martin Jambor  <mjam...@suse.cz>

            PR ipa/118138
            * gcc.dg/ipa/pr118138.c: New test.

Reply via email to