From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6C730385E45C; Mon, 28 Mar 2022 09:18:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C730385E45C From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102892] [12 Regression] Dead Code Elimination Regression at -O3 (trunk vs 11.2.0) Date: Mon, 28 Mar 2022 09:18:32 +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: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc resolution bug_status 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 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: Mon, 28 Mar 2022 09:18:32 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102892 Eric Botcazou changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ebotcazou at gcc dot gnu.o= rg Resolution|FIXED |--- Status|RESOLVED |REOPENED --- Comment #8 from Eric Botcazou --- The test fails (to link) on SPARC though, here's the .optimized dump at -O3: ;; Function main (main, funcdef_no=3D0, decl_uid=3D1488, cgraph_uid=3D1, symbol_order=3D1) (executed once) Removing basic block 8 Removing basic block 9 Removing basic block 10 Removing basic block 11 int main () { unsigned int ivtmp.8; long int a; long int _1; void * _2; unsigned int _17; [local count: 44232128]: if (a_9(D) !=3D 1) goto ; [89.00%] else goto ; [11.00%] [local count: 715863673]: # ivtmp.8_23 =3D PHI bar (); _2 =3D (void *) ivtmp.8_23; _1 =3D MEM[(long int *)_2]; if (_1 =3D=3D 1) goto ; [20.24%] else goto ; [79.76%] [local count: 144890806]: foo (); [local count: 715863674]: ivtmp.8_24 =3D ivtmp.8_23 + 4; if (_17 !=3D ivtmp.8_24) goto ; [66.67%] else goto ; [33.33%] [local count: 238597362]: ivtmp.8_7 =3D (unsigned int) &b; _17 =3D ivtmp.8_7 + 8; goto ; [100.00%] [local count: 44232131]: return 0; }=