public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102844] [9/10/11/12 Regression] vrp inserting assert causes miscompiling when doing update_ssa Date: Wed, 20 Oct 2021 09:19:01 +0000 [thread overview] Message-ID: <bug-102844-4-u18A2oMeaq@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102844-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102844 --- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> --- The following removes the premature optimization(?) using EDGE_NO_COPY_SRC_BLOCK in case the block contained a condition we could thread through. That fixes the testcase. diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c index c3ea2d680d8..2005e30322b 100644 --- a/gcc/tree-ssa-threadedge.c +++ b/gcc/tree-ssa-threadedge.c @@ -989,8 +989,11 @@ thread_around_empty_blocks (edge taken_edge, return false; bitmap_set_bit (visited, taken_edge->dest->index); + /* We may not use EDGE_NO_COPY_SRC_BLOCK since the condition + might later be simplified to something needing a temporary + SSA definition. See PR102844. */ jump_thread_edge *x - = new jump_thread_edge (taken_edge, EDGE_NO_COPY_SRC_BLOCK); + = new jump_thread_edge (taken_edge, EDGE_COPY_SRC_BLOCK); path->safe_push (x); thread_around_empty_blocks (taken_edge,
next prev parent reply other threads:[~2021-10-20 9:19 UTC|newest] Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-19 17:45 [Bug c/102844] New: gcc-9.x miscompiles unsigned char expression in switch breiten at lexmark dot com 2021-10-19 17:58 ` [Bug tree-optimization/102844] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org 2021-10-19 18:11 ` pinskia at gcc dot gnu.org 2021-10-19 18:13 ` pinskia at gcc dot gnu.org 2021-10-19 18:23 ` [Bug tree-optimization/102844] [9/10/11/12 Regression] vrp inserting assert causes miscompiling when doing update_ssa pinskia at gcc dot gnu.org 2021-10-20 7:10 ` rguenth at gcc dot gnu.org 2021-10-20 7:44 ` rguenth at gcc dot gnu.org 2021-10-20 7:49 ` rguenth at gcc dot gnu.org 2021-10-20 8:08 ` marxin at gcc dot gnu.org 2021-10-20 8:28 ` rguenth at gcc dot gnu.org 2021-10-20 8:33 ` marxin at gcc dot gnu.org 2021-10-20 8:59 ` rguenth at gcc dot gnu.org 2021-10-20 9:00 ` rguenth at gcc dot gnu.org 2021-10-20 9:03 ` rguenth at gcc dot gnu.org 2021-10-20 9:08 ` rguenth at gcc dot gnu.org 2021-10-20 9:19 ` rguenth at gcc dot gnu.org [this message] 2021-10-20 9:21 ` aldyh at gcc dot gnu.org 2021-10-20 9:30 ` rguenther at suse dot de 2021-10-20 9:47 ` aldyh at gcc dot gnu.org 2021-10-20 9:50 ` rguenth at gcc dot gnu.org 2021-10-20 9:50 ` rguenth at gcc dot gnu.org 2021-10-20 10:56 ` marxin at gcc dot gnu.org 2021-10-20 12:49 ` [Bug tree-optimization/102844] [9/10/11/12 Regression] DOM jump threading not copying block that became non-empty amacleod at redhat dot com 2021-10-20 16:13 ` law at gcc dot gnu.org 2021-10-21 6:02 ` rguenth at gcc dot gnu.org 2022-05-20 8:24 ` [Bug tree-optimization/102844] [9/10/11/12/13 " rguenth at gcc dot gnu.org 2022-05-20 12:01 ` aldyh at gcc dot gnu.org 2022-05-20 15:11 ` law at gcc dot gnu.org 2022-05-20 15:33 ` aldyh at gcc dot gnu.org 2022-05-27 9:46 ` [Bug tree-optimization/102844] [10/11/12/13 " rguenth at gcc dot gnu.org 2022-06-28 10:46 ` jakub at gcc dot gnu.org 2023-01-19 13:26 ` rguenth at gcc dot gnu.org 2023-07-07 10:41 ` [Bug tree-optimization/102844] [11/12/13/14 " rguenth at gcc dot gnu.org 2023-09-19 11:24 ` rguenth at gcc dot gnu.org 2023-09-19 11:25 ` [Bug tree-optimization/102844] [11/12/13 " rguenth 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-102844-4-u18A2oMeaq@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: linkBe 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).