From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B1CC1385842A; Tue, 10 Jan 2023 12:12:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B1CC1385842A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673352763; bh=F4gphQF6cw/pLjMXZumzi9o4iLekyPnqELBOKkI2w6Q=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nYlLuE/Vba/wbxwybgO0jRdtWXJSlScWvJsiY6//8xvX8Tau7IBATrDfKVdXrM/hh auxneepMExHy8hWRnaPzzoH1X7+QT/Spj9+Rbybnr4SpECZ9iWKTsEnsFm0YBxZrx4 8q1gD42uW5C+TeQjXuqgW+dKv164bjB6+NoRH58g= From: "yann at ywg dot ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106293] [13 Regression] 456.hmmer at -Ofast -march=native regressed by 19% on zen2 and zen3 in July 2022 Date: Tue, 10 Jan 2023 12:12:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: yann at ywg dot ch X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: 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=3D106293 Yann Girsberger changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yann at ywg dot ch --- Comment #6 from Yann Girsberger --- I found a DCE Regression in trunk that bisects to the same commit as in the original report. It seems to be present in -Ofast and -O2. Let me know if this should be a new report.=20 cat case.c #14 int a; static long b =3D 4073709551612, d; short c; void foo(); static char e(int **f) { **f =3D 0; if (a) { unsigned long *g =3D &b; unsigned long **h =3D &g; for (; d;) { foo(); for (; c;) { unsigned long ***i =3D &h; } } } return 1; } int main() { int *j =3D &a; e(&j); if (b <=3D 0) foo(); } `gcc-cb93c5f8008b95743b741d6f1842f9be50c6985c (trunk) -O2` can not eliminate `foo` but `gcc-releases/gcc-12.2.0 -O2` can. `gcc-cb93c5f8008b95743b741d6f1842f9be50c6985c (trunk) -O2 -S -o /dev/stdout case.c` --------- OUTPUT --------- main: .LFB1: .cfi_startproc cmpq $0, b(%rip) movl $0, a(%rip) jle .L8 xorl %eax, %eax ret .L8: pushq %rax .cfi_def_cfa_offset 16 xorl %eax, %eax call foo xorl %eax, %eax popq %rdx .cfi_def_cfa_offset 8 ret ---------- END OUTPUT --------- `gcc-releases/gcc-12.2.0 -O2 -S -o /dev/stdout case.c` --------- OUTPUT --------- main: .LFB1: .cfi_startproc movl $0, a(%rip) xorl %eax, %eax ret ---------- END OUTPUT --------- Bisects to: https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dcommit;h=3Dd2a898666609452ef79a14f= eae1cadc3538e4b45=