From: Richard Biener Date: Mon, 23 Mar 2020 08:33:25 +0000 (+0100) Subject: ipa/94245 - avoid folding when we want an ADDR_EXPR X-Git-Tag: upstream/12.2.0~17703 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7a2090b04e54ffccc64ad2dfd5b46eb4bb8ce482;p=platform%2Fupstream%2Fgcc.git ipa/94245 - avoid folding when we want an ADDR_EXPR Another case where build_fold_addr_expr is harmful. 2020-03-23 Richard Biener PR ipa/94245 * ipa-prop.c (ipa_read_jump_function): Build the ADDR_EXRP directly rather than also folding it via build_fold_addr_expr. --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5df915d..c33327e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2020-03-23 Richard Biener + PR ipa/94245 + * ipa-prop.c (ipa_read_jump_function): Build the ADDR_EXRP + directly rather than also folding it via build_fold_addr_expr. + +2020-03-23 Richard Biener + PR tree-optimization/94266 * tree-ssa-forwprop.c (pass_forwprop::execute): Do not propagate addresses of TARGET_MEM_REFs. diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index a77130d..71ac0e1 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -4625,7 +4625,7 @@ ipa_read_jump_function (class lto_input_block *ib, { tree t = stream_read_tree (ib, data_in); if (flag && prevails) - t = build_fold_addr_expr (t); + t = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (t)), t); ipa_set_jf_constant (jump_func, t, cs); } break;