From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 136883858426; Fri, 11 Aug 2023 13:24:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 136883858426 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691760249; bh=z3a+d3vGS1GNx/myAbQG+jUU9oHQJnXM016l1wxav9g=; h=From:To:Subject:Date:From; b=HiBMf/I1ZUY+pOEpnYpzSm5FqpmAT2eXSHDEcecLNEmhbmKCXyQj1hP0N71TI2lvz huRYM7ACYlNDlJkG8qO3SG7MbaR4QTuID330+bl4eFjzCoqHUwtTsOmGCYo/OL5kAP j2jfznK5Ru+QKq4zsl0Za0sISShcLWGeDyq6Ojrw= From: "scherrer.sv at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110992] New: [14 Regression] Dead Code Elimination Regression at -O3 since r14-1654-g7ceed7e3e29 Date: Fri, 11 Aug 2023 13:24:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: scherrer.sv at gmail dot com 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 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110992 Bug ID: 110992 Summary: [14 Regression] Dead Code Elimination Regression at -O3 since r14-1654-g7ceed7e3e29 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: scherrer.sv at gmail dot com Target Milestone: --- static unsigned b; static short c =3D 4; void foo(void); static short(a)(short d, short g) { return d * g; } void e(); static char f() { b =3D 0; return 0; } int main() { int h =3D b; if ((short)(a(c && e, 65535) & h)) { foo(); h || f(); } } gcc-bcda361daae (trunk) -O3 cannot eliminate the call to foo but gcc-releases/gcc-13.1.0 -O3 can. ----------------------------------------------------------------------- gcc-bcda361daaec8623c91d0dff3ea8e576373b5f50 -O3 case.c -S -o case.s --------- OUTPUT --------- main: .LFB2: .cfi_startproc cmpw $0, b(%rip) jne .L8 xorl %eax, %eax ret .L8: pushq %rax .cfi_def_cfa_offset 16 call foo xorl %eax, %eax popq %rdx .cfi_def_cfa_offset 8 ret ---------- END OUTPUT --------- ----------------------------------------------------------------------- gcc-2b98cc24d6af0432a74f6dad1c722ce21c1f7458 -O3 case.c -S -o case.s --------- OUTPUT --------- main: .LFB2: .cfi_startproc xorl %eax, %eax ret ---------- END OUTPUT --------- ----------------------------------------------------------------------- Bisects to r14-1654-g7ceed7e3e29=