From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 93E673857C75; Thu, 1 Apr 2021 07:59:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93E673857C75 From: "zhendong.su at inf dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/99862] New: [meta-issue] various missed optimizations for dead code elimination Date: Thu, 01 Apr 2021 07:59:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zhendong.su at inf dot ethz.ch X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2021 07:59:32 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99862 Bug ID: 99862 Summary: [meta-issue] various missed optimizations for dead code elimination Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: zhendong.su at inf dot ethz.ch CC: marxin at gcc dot gnu.org Target Milestone: --- [561] % gcctk -v Using built-in specs. COLLECT_GCC=3Dgcctk COLLECT_LTO_WRAPPER=3D/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=3D/local/suz-local/software/local/gcc-trunk --enable-languages=3Dc= ,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)=20 [562] %=20 [562] % gcctk -O1 -S -o O1.s small.c [563] % gcctk -O3 -S -o O3.s small.c [564] %=20 [564] % wc O1.s O3.s 23 45 420 O1.s 39 74 669 O3.s 62 119 1089 total [565] %=20 [565] % grep foo O1.s [566] % grep foo O3.s call foo [567] %=20 [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; }=