public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/108357] [13 Regression] Dead Code Elimination Regression at -O2 since r13-4607-g2dc5d6b1e7ec88
Date: Thu, 13 Apr 2023 13:14:03 +0000	[thread overview]
Message-ID: <bug-108357-4-rxCA9itKXQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108357-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #15 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 13 Apr 2023, xry111 at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108357
> 
> --- Comment #14 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
> (In reply to rguenther@suse.de from comment #13)
> > On Thu, 13 Apr 2023, chenglulu at loongson dot cn wrote:
> > 
> > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108357
> > > 
> > > --- Comment #10 from chenglulu <chenglulu at loongson dot cn> ---
> > > (In reply to Xi Ruoyao from comment #5)
> > > > The test fails on loongarch64-linux-gnu.  foo is kept in 114t.threadfull1,
> > > > but removed in 135t.forwprop3.
> > > > 
> > > > Does this mean something is wrong for LoongArch, or we should simply check
> > > > the tree dump in a later pass (for e.g. 254t.optimized)?
> > > 
> > > If the definition of the macro DEFAULT_SIGNED_CHAR is changed to 0, the test
> > > case can pass the test. I guess it is because the definition of
> > > DEFAULT_SIGNED_CHAR affects the optimization of the ccp pass, resulting in some
> > > blocks that cannot be removed, resulting in the failure of this test case.
> > 
> > Can you check if making b unsigned fixes the test for you?  If so
> > that's what we should do.
> 
> It works?
> 
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr108357.c
> b/gcc/testsuite/gcc.dg/tree-ssa/pr108357.c
> index 44c457b7a97..79cf371ef28 100644
> --- a/gcc/testsuite/gcc.dg/tree-ssa/pr108357.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr108357.c
> @@ -1,7 +1,7 @@
>  /* { dg-do compile } */
>  /* { dg-options "-O2 -fdump-tree-threadfull1" } */
> 
> -static char b;
> +static unsigned char b;
>  static unsigned c;
>  void foo();
>  short(a)(short d, short e) { return d * e; }
> 
> But I'm still wondering why this is not an issue for x86_64.

Yes, that's interesting to see.  It does change how b is extended
in b ^ 9854 (but for the value zero it doesn't matter).

  parent reply	other threads:[~2023-04-13 13:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 12:59 [Bug tree-optimization/108357] New: Dead Code Elimination Regression at -O2 (trunk vs. 12.2.0) yann at ywg dot ch
2023-01-10 14:46 ` [Bug tree-optimization/108357] [13 Regression] Dead Code Elimination Regression at -O2 since r13-4607-g2dc5d6b1e7ec88 marxin at gcc dot gnu.org
2023-01-10 16:10 ` rguenth at gcc dot gnu.org
2023-03-27 12:20 ` rguenth at gcc dot gnu.org
2023-03-27 12:24 ` cvs-commit at gcc dot gnu.org
2023-03-27 12:31 ` jakub at gcc dot gnu.org
2023-03-28 17:15 ` xry111 at gcc dot gnu.org
2023-03-29  6:49 ` rguenth at gcc dot gnu.org
2023-03-29  7:36 ` xry111 at gcc dot gnu.org
2023-03-29  7:37 ` xry111 at gcc dot gnu.org
2023-03-29  9:03 ` rguenth at gcc dot gnu.org
2023-04-13 11:59 ` chenglulu at loongson dot cn
2023-04-13 12:05 ` xry111 at gcc dot gnu.org
2023-04-13 12:16 ` chenglulu at loongson dot cn
2023-04-13 13:05 ` rguenther at suse dot de
2023-04-13 13:08 ` xry111 at gcc dot gnu.org
2023-04-13 13:14 ` rguenther at suse dot de [this message]
2023-04-14 10:11 ` chenglulu at loongson dot cn
2023-04-14 10:22 ` rguenth at gcc dot gnu.org
2023-04-14 10:28 ` xry111 at gcc dot gnu.org
2023-04-14 11:22 ` chenglulu at loongson dot cn
2023-04-14 11:35 ` rguenther at suse dot de
2024-02-16 14:10 ` ro at gcc dot gnu.org
2024-05-22  8:32 ` ro 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-108357-4-rxCA9itKXQ@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).