From: Jan Hubicka Date: Fri, 12 Nov 2021 19:15:48 +0000 (+0100) Subject: Fix ipa-pure-const X-Git-Tag: basepoints/gcc-13~3098 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b301cb43a795884884977703a3767e8765d193d1;p=thirdparty%2Fgcc.git Fix ipa-pure-const gcc/ChangeLog: * ipa-pure-const.c (propagate_pure_const): Remove redundant check; fix call of ipa_make_function_const and ipa_make_function_pure. --- diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index b831844afa68..5056850c0a87 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -1611,9 +1611,6 @@ propagate_pure_const (void) enum pure_const_state_e edge_state = IPA_CONST; bool edge_looping = false; - if (e->recursive_p ()) - looping = true; - if (e->recursive_p ()) looping = true; @@ -1800,11 +1797,11 @@ propagate_pure_const (void) switch (this_state) { case IPA_CONST: - remove_p |= ipa_make_function_const (node, looping, false); + remove_p |= ipa_make_function_const (node, this_looping, false); break; case IPA_PURE: - remove_p |= ipa_make_function_pure (node, looping, false); + remove_p |= ipa_make_function_pure (node, this_looping, false); break; default: