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/110924] [14 Regression] ICE on valid code at -O{s,2,3} on x86_64-linux-gnu: verify_ssa failed Date: Tue, 08 Aug 2023 09:36:38 +0000 [thread overview] Message-ID: <bug-110924-4-w8mXyqBK3r@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-110924-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110924 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> --- Hm, OK. So I actually thought of this issue. It's basically a hole in the requirement of all function "exits" having a virtual use and thus virtual PHIs being created along the paths to it. I was aware of GIMPLE_RESX and thought about const noreturn (but that attribute combination is rejected). IPA pure-const detects func_15 as looping 'const' and noreturn: Function is locally const. Function found to be noreturn: func_15 Function found to be looping const: func_15/2 Declaration updated to be looping const: func_15/2 so there's two ways to "fix" this, one - drop the assumption we have PHIs on the paths to function exit (including in not returning regions). That makes virtual_operand_live::get_live_in (basic_block bb) { ... /* Since we don't have a virtual PHI we can now pick any of the incoming edges liveout value. All returns from the function have a virtual use forcing generation of virtual PHIs. */ edge_iterator ei; edge e; FOR_EACH_EDGE (e, ei, bb->preds) if (liveout[e->src->index]) { if (EDGE_PRED (bb, 0) != e) liveout[EDGE_PRED (bb, 0)->src->index] = liveout[e->src->index]; return liveout[e->src->index]; } instead required to check each edge and we can't simply take the value from the immediate dominator as fallback. When we discover divergence we need to return NULL (unknown - nobody created the actually live VOP). The other alternative is to make sure we _do_ have the virtual operand. Either by making sure the "invalid" combination of const + noreturn isn't detected or by creating a virtual use in that case anyway (and fixup code because of that inconsistency).
next prev parent reply other threads:[~2023-08-08 9:36 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-06 23:20 [Bug tree-optimization/110924] New: " zhendong.su at inf dot ethz.ch 2023-08-07 0:27 ` [Bug tree-optimization/110924] [14 Regression] " pinskia at gcc dot gnu.org 2023-08-07 0:31 ` pinskia at gcc dot gnu.org 2023-08-07 0:44 ` pinskia at gcc dot gnu.org 2023-08-07 7:07 ` dcb314 at hotmail dot com 2023-08-07 7:15 ` pinskia at gcc dot gnu.org 2023-08-07 7:27 ` pinskia at gcc dot gnu.org 2023-08-07 7:37 ` dcb314 at hotmail dot com 2023-08-08 7:19 ` dcb314 at hotmail dot com 2023-08-08 8:49 ` rguenth at gcc dot gnu.org 2023-08-08 9:36 ` rguenth at gcc dot gnu.org [this message] 2023-08-08 9:38 ` rguenth at gcc dot gnu.org 2023-08-08 9:42 ` rguenth at gcc dot gnu.org 2023-08-08 10:26 ` rguenth at gcc dot gnu.org 2023-08-08 12:24 ` cvs-commit at gcc dot gnu.org 2023-08-08 12:24 ` 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-110924-4-w8mXyqBK3r@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).