public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "yann at ywg dot ch" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105086] New: Dead Code Elimination Regression at -Os (trunk vs. 11.2.0) 25 Date: Mon, 28 Mar 2022 17:06:03 +0000 [thread overview] Message-ID: <bug-105086-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105086 Bug ID: 105086 Summary: Dead Code Elimination Regression at -Os (trunk vs. 11.2.0) 25 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: yann at ywg dot ch Target Milestone: --- Created attachment 52702 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52702&action=edit The case presented. cat case.c #25 void foo(); int main() { unsigned a = -23; for (; a >= 2; ++a) if (a == 55) foo(); } `gcc-0127fb1b78a36a7b228d4b3fe32eedfc8d273363 (trunk) -Os` can not eliminate `foo` but `gcc-releases/gcc-11.2.0 -Os` can. `gcc-0127fb1b78a36a7b228d4b3fe32eedfc8d273363 (trunk) -Os -S -o /dev/stdout case.c` --------- OUTPUT --------- main: .LFB0: .cfi_startproc movl $-23, %eax .L6: cmpl $55, %eax je .L10 incl %eax jne .L6 xorl %eax, %eax ret .L10: pushq %rax .cfi_def_cfa_offset 16 .L7: xorl %eax, %eax call foo movl $56, %eax .L2: incl %eax je .L12 cmpl $55, %eax jne .L2 jmp .L7 .L12: xorl %eax, %eax popq %rdx .cfi_def_cfa_offset 8 ret ---------- END OUTPUT --------- `gcc-releases/gcc-11.2.0 -Os -S -o /dev/stdout case.c` --------- OUTPUT --------- main: .LFB0: .cfi_startproc xorl %eax, %eax ret ---------- END OUTPUT --------- Bisects to: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=502ffb1f389011b28ee51815242c7397790802d5 ----- Build information ----- ----- 0127fb1b78a36a7b228d4b3fe32eedfc8d273363 (trunk) Target: x86_64-pc-linux-gnu Configured with: ../configure --disable-multilib --disable-bootstrap --enable-languages=c,c++ --prefix=/zdata/compiler_cache/gcc-0127fb1b78a36a7b228d4b3fe32eedfc8d273363 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.1 20220328 (experimental) (GCC) ----- releases/gcc-11.2.0 Target: x86_64-pc-linux-gnu Configured with: ../configure --disable-multilib --disable-bootstrap --enable-languages=c,c++ --prefix=/zdata/compiler_cache/gcc-01a9836c07053b3286b2259d6b628c7583413f55 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.2.0 (GCC)
next reply other threads:[~2022-03-28 17:06 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-28 17:06 yann at ywg dot ch [this message] 2022-03-28 17:11 ` [Bug tree-optimization/105086] [12 Regression] " jakub at gcc dot gnu.org 2022-03-28 20:07 ` amacleod at redhat dot com 2022-03-29 7:31 ` rguenth at gcc dot gnu.org 2022-03-29 13:24 ` amacleod at redhat dot com 2022-03-29 13:37 ` jakub at gcc dot gnu.org 2022-03-29 13:41 ` amacleod at redhat dot com 2022-04-19 15:37 ` rguenth at gcc dot gnu.org 2022-05-06 8:33 ` [Bug tree-optimization/105086] [12/13 " jakub at gcc dot gnu.org 2023-05-08 12:24 ` [Bug tree-optimization/105086] [12/13/14 " 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-105086-4@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: linkBe 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).