> Hi,
> 
> 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.
> 
> Bootstrapped and LTO-bootstrapped and tested on x86_64-linux.  OK for
> master?
> 
> Thanks,
> 
> Martin
> 
> 
> 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.

OK,
thanks!
Honza

Reply via email to