public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/107661] [13 Regression] lambdas get merged incorrectly in tempaltes, cause llvm-12 miscompilation since r13-3358-ge0403e95689af7
Date: Tue, 22 Nov 2022 17:30:28 +0000	[thread overview]
Message-ID: <bug-107661-4-EWyM8m0lYx@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107661-4@http.gcc.gnu.org/bugzilla/>

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

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

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

commit r13-4238-gc4a92a9117a034e7cf291ae51d8b9b844fb5a88b
Author: Martin Jambor <mjambor@suse.cz>
Date:   Tue Nov 22 18:22:03 2022 +0100

    ipa-cp: Do not be too optimistic about self-recursive edges (PR 107661)

    PR 107661 shows that function push_agg_values_for_index_from_edge
    should not attempt to optimize self-recursive call graph edges when
    called from cgraph_edge_brings_all_agg_vals_for_node.  Unlike when
    being called from find_aggregate_values_for_callers_subset, we cannot
    expect that any cloning for constants would lead to the edge leading
    from a new clone to the same new clone, in this case it would only be
    redirected to a new callee.

    Fixed by adding a parameter to push_agg_values_from_edge whether being
    optimistic about self-recursive edges is possible.

    gcc/ChangeLog:

    2022-11-22  Martin Jambor  <mjambor@suse.cz>

            PR ipa/107661
            * ipa-cp.cc (push_agg_values_from_edge): New parameter
            optimize_self_recursion, use it to decide whether to pass interim
to
            the helper function.
            (find_aggregate_values_for_callers_subset): Pass true in the new
            parameter of push_agg_values_from_edge.
            (cgraph_edge_brings_all_agg_vals_for_node): Pass false in the new
            parameter of push_agg_values_from_edge.

    gcc/testsuite/ChangeLog:

    2022-11-22  Martin Jambor  <mjambor@suse.cz>

            PR ipa/107661
            * g++.dg/ipa/pr107661.C: New test.

  parent reply	other threads:[~2022-11-22 17:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-12 18:06 [Bug middle-end/107661] New: [13 Regression] lambdas get merged incorrectly in tempaltes, cause llvm-12 miscompilation slyfox at gcc dot gnu.org
2022-11-12 18:13 ` [Bug middle-end/107661] " pinskia at gcc dot gnu.org
2022-11-12 18:21 ` slyfox at gcc dot gnu.org
2022-11-12 20:16 ` slyfox at gcc dot gnu.org
2022-11-12 22:47 ` slyfox at gcc dot gnu.org
2022-11-13 14:23 ` [Bug middle-end/107661] [13 Regression] lambdas get merged incorrectly in tempaltes, cause llvm-12 miscompilation since r13-3358-ge0403e95689af7 slyfox at gcc dot gnu.org
2022-11-13 14:57 ` jamborm at gcc dot gnu.org
2022-11-14 13:55 ` rguenth at gcc dot gnu.org
2022-11-15 23:21 ` slyfox at gcc dot gnu.org
2022-11-18  8:42 ` slyfox at gcc dot gnu.org
2022-11-18  8:43 ` slyfox at gcc dot gnu.org
2022-11-18  8:54 ` slyfox at gcc dot gnu.org
2022-11-19 20:11 ` slyfox at gcc dot gnu.org
2022-11-19 20:29 ` slyfox at gcc dot gnu.org
2022-11-20 21:26 ` slyfox at gcc dot gnu.org
2022-11-21 22:52 ` jamborm at gcc dot gnu.org
2022-11-22 14:13 ` [Bug ipa/107661] " jamborm at gcc dot gnu.org
2022-11-22 17:30 ` cvs-commit at gcc dot gnu.org [this message]
2022-11-22 17:33 ` jamborm at gcc dot gnu.org
2022-11-24 22:46 ` slyfox at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-107661-4-EWyM8m0lYx@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).