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 07:44:22 +0000	[thread overview]
Message-ID: <bug-102844-4-5Nr8OUdz7U@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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-bisection

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the issue is that the SSA form is invalid at the start of VRP2 - we have

<bb 16> [local count: 25270028]:
_45 = (signed char) nd_5;
if (_45 < 0)
  goto <bb 13>; [33.33%]
else
  goto <bb 14>; [66.67%]

<bb 10> [local count: 25267450]:
<L1>:
ta = 0;
goto <bb 13>; [100.00%]

<bb 13> [local count: 25265782]:
<L4>:
nd.7_10 = _45;
_11 = _45 + -128;
_12 = (unsigned char) _11;
dic = _12;
goto <bb 15>; [100.00%]

but there's a PHI missing for _45 - the definition site does not dominate the
use.

(gdb) p verify_ssa (true, true)
t.c: In function 'snod.constprop':
t.c:18:22: error: definition in block 16 does not dominate use in block 13
   18 | static unsigned char snod(unsigned char cd, unsigned char *tl, unsigned
char *ic)
      |                      ^~~~
for SSA_NAME: _45 in statement:
nd.7_10 = _45;

and the issue pops up after DOM3.

It would be nice to bisect with checking enabled or -fchecking - Martin?

  parent reply	other threads:[~2021-10-20  7:44 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 [this message]
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
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-5Nr8OUdz7U@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).