public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "amacleod at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101189] [12 Regression] ICE at -Os and above on x86_64-linux-gnu: in fold_cond, at vr-values.c:3471 since r12-1721-ga2c9173331914eff Date: Thu, 24 Jun 2021 19:15:24 +0000 [thread overview] Message-ID: <bug-101189-4-gOCwsCxz89@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101189-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101189 --- Comment #2 from Andrew Macleod <amacleod at redhat dot com> --- We always register relations on outgoing edges from a conditional. in this case _2 = -f_6; // f_6 was known to be [4,5] if (_2 == f_6) // This this was known to fail because _2 was [-5, -4] goto <bb 8>; [INV] else goto <bb 10>; [INV] <bb 8> : if (_2 != f_6) // which makes this unreachable code goto <bb 10>; [INV] else goto <bb 9>; [INV] THe problem is we were registering _2 == f_6 as a relation on the edge 6->8 which would then make the condition on bb_8 false. We know that _2 != f_6, so the vrp folder was saying this branch was always taken, and the relation code was prompted that its never taken :-P Its an unreachable branch, but it was adding an inconsitency. Instead, if we know an edge cannot be taken, like 6->8, do not register a relation on that edge.
next prev parent reply other threads:[~2021-06-24 19:15 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-24 7:46 [Bug tree-optimization/101189] New: ICE at -Os and above on x86_64-linux-gnu: in fold_cond, at vr-values.c:3471 zhendong.su at inf dot ethz.ch 2021-06-24 9:30 ` [Bug tree-optimization/101189] [12 Regression] ICE at -Os and above on x86_64-linux-gnu: in fold_cond, at vr-values.c:3471 since r12-1721-ga2c9173331914eff marxin at gcc dot gnu.org 2021-06-24 19:15 ` amacleod at redhat dot com [this message] 2021-06-24 20:02 ` cvs-commit at gcc dot gnu.org 2021-06-24 20:03 ` amacleod at redhat dot com
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-101189-4-gOCwsCxz89@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).