public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/110177] [12/13/14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r12-2305-g398572c1544
Date: Thu, 08 Jun 2023 20:31:53 +0000	[thread overview]
Message-ID: <bug-110177-4-aVzdI8yl0Z@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110177-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110177

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Hmm, in ccp1, GCC 11.3 does:
Visiting statement:
# RANGE [0, 0] NONZERO 0
b_33 = (short intD.25) _11;
which is likely CONSTANT
Applying pattern match.pd:3405, gimple-match.c:27041
Applying pattern match.pd:3322, gimple-match.c:26980
Match-and-simplified (short int) _11 to _10
Lattice value changed to CONSTANT 0.  Adding SSA edges to worklist.
marking stmt to be not simulated again

Visiting statement:
if (b_33 != 0)
which is likely CONSTANT
Adding destination of edge (4 -> 6) to worklist
marking stmt to be not simulated again



While in GCC 12+ does:
Visiting statement:
b_33 = (short intD.25) _11;
which is likely CONSTANT
Applying pattern match.pd:3730, gimple-match.cc:69683
Applying pattern match.pd:3647, gimple-match.cc:69622
Match-and-simplified (short int) _11 to _10
Lattice value changed to CONSTANT _10.  Adding SSA edges to worklist.
marking stmt to be not simulated again

Visiting statement:
if (b_33 != 0)
which is likely CONSTANT
Matching expression match.pd:2118, generic-match.cc:693
Matching expression match.pd:2121, generic-match.cc:753
Matching expression match.pd:2128, generic-match.cc:776
Adding destination of edge (4 -> 5) to worklist
Adding destination of edge (4 -> 6) to worklist

  parent reply	other threads:[~2023-06-08 20:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-08 14:52 [Bug tree-optimization/110177] New: " theodort at inf dot ethz.ch
2023-06-08 20:21 ` [Bug tree-optimization/110177] " pinskia at gcc dot gnu.org
2023-06-08 20:31 ` pinskia at gcc dot gnu.org [this message]
2023-06-08 22:27 ` pinskia at gcc dot gnu.org
2023-06-20 11:17 ` theodort at inf dot ethz.ch
2024-03-08 15:34 ` law at gcc dot gnu.org
2024-06-20  9:12 ` [Bug tree-optimization/110177] [12/13/14/15 " 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-110177-4-aVzdI8yl0Z@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).