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 ipa/99862] [meta-issue] various missed optimizations for dead code elimination
Date: Fri, 09 Apr 2021 11:37:46 +0000	[thread overview]
Message-ID: <bug-99862-4-iisooouKX4@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99862-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Zhendong Su from comment #0)
> [561] % gcctk -v
> Using built-in specs.
> COLLECT_GCC=gcctk
> COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/
> x86_64-pc-linux-gnu/11.0.1/lto-wrapper
> Target: x86_64-pc-linux-gnu
> Configured with: ../gcc-trunk/configure --disable-bootstrap
> --prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
> --disable-werror --enable-multilib --with-system-zlib
> Thread model: posix
> Supported LTO compression algorithms: zlib
> gcc version 11.0.1 20210401 (experimental) [master revision
> e4bb1bd60a9:c23a685bf70:95d217ab52d31dc06fda42fc136dea165909e88b] (GCC) 
> [562] % 
> [562] % gcctk -O1 -S -o O1.s small.c
> [563] % gcctk -O3 -S -o O3.s small.c
> [564] % 
> [564] % wc O1.s O3.s
>   23   45  420 O1.s
>   39   74  669 O3.s
>   62  119 1089 total
> [565] % 
> [565] % grep foo O1.s
> [566] % grep foo O3.s
>         call    foo
> [567] % 
> [567] % cat small.c
> extern void foo(void);
> static int a, b;
> static int c() {
>   foo();
>   while (1)
>     while (b)
>       foo();
> }
> void d() {
>   if (a)
>     c();
> }
> int main() {
>   d();
>   return 0;
> }

I filed this as PR99991.

  parent reply	other threads:[~2021-04-09 11:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  7:59 [Bug ipa/99862] New: " zhendong.su at inf dot ethz.ch
2021-04-01  8:01 ` [Bug ipa/99862] " zhendong.su at inf dot ethz.ch
2021-04-01  8:06 ` zhendong.su at inf dot ethz.ch
2021-04-02  0:28 ` egallager at gcc dot gnu.org
2021-04-02 17:02 ` zhendong.su at inf dot ethz.ch
2021-04-09 11:37 ` rguenth at gcc dot gnu.org [this message]
2021-04-09 11:39 ` rguenth at gcc dot gnu.org
2021-04-09 11:42 ` rguenth at gcc dot gnu.org
2021-04-09 11:53 ` rguenth at gcc dot gnu.org
2021-04-09 11:59 ` zhendong.su at inf dot ethz.ch
2021-04-10 10:12 ` egallager 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-99862-4-iisooouKX4@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).