public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-7764] tree-optimization/105012 - fix ICE from local DSE of if-conversion Date: Tue, 22 Mar 2022 13:05:34 +0000 (GMT) [thread overview] Message-ID: <20220322130534.F01793946C36@sourceware.org> (raw) https://gcc.gnu.org/g:08f263e703c4100fa7b9f08cb26cee6c0bd75e4a commit r12-7764-g08f263e703c4100fa7b9f08cb26cee6c0bd75e4a Author: Richard Biener <rguenther@suse.de> Date: Tue Mar 22 12:28:30 2022 +0100 tree-optimization/105012 - fix ICE from local DSE of if-conversion The following guards dse_classify_store with the same condition as the DSE pass does - availability of a virtual definition. For the PR we run into the fortran frontend generating a clobber for a FUNCTION_DECL lhs which is ignored by the operand scanner and has no virtual operands assigned. Apart from fixing the frontend the following fixes the ICE by adjusting if-conversion. 2022-03-22 Richard Biener <rguenther@suse.de> PR tree-optimization/105012 * tree-if-conv.cc (ifcvt_local_dce): Only call dse_classify_store when we have a VDEF. Diff: --- gcc/tree-if-conv.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-if-conv.cc b/gcc/tree-if-conv.cc index 375628e6e9e..7495ed653c0 100644 --- a/gcc/tree-if-conv.cc +++ b/gcc/tree-if-conv.cc @@ -3145,7 +3145,7 @@ ifcvt_local_dce (class loop *loop) gimple_stmt_iterator gsiprev = gsi; gsi_prev (&gsiprev); stmt = gsi_stmt (gsi); - if (gimple_store_p (stmt)) + if (gimple_store_p (stmt) && gimple_vdef (stmt)) { tree lhs = gimple_get_lhs (stmt); ao_ref write;
reply other threads:[~2022-03-22 13:05 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220322130534.F01793946C36@sourceware.org \ --to=rguenth@gcc.gnu.org \ --cc=gcc-cvs@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).