From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ADD7E3858C78; Sat, 4 Nov 2023 20:37:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ADD7E3858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699130270; bh=6LBTqh1ivq7BYTELmb1f2D4Ewf9b4HZkXEk5BOXjfyw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fnPfctfaX17YNBFHkyVP84SzYQmzPx6x42nMowWN9WzBcHYXb8ZgolCJQF0skpWFw fBEdQjutNrbkWe/yCFlalr6HUXq3LQfnF9rF3N9oO0GNhvEtbopLEwXVfAWaw3/tno qelGqXEH0Z7bAb55GthgwtaM4h+L7TSYgfVZ6uAY= From: "tkoenig at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110903] [12/13 Regression] Dead Code Elimination Regression Date: Sat, 04 Nov 2023 20:37:49 +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: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: tkoenig at gcc dot gnu.org 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: 12.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D110903 --- Comment #6 from Thomas Koenig --- The original regression was caused by r12-4526-gd8edfadfc7a979 . d8edfadfc7a9795b65177a50ce44fd348858e844 is the first bad commit commit d8edfadfc7a9795b65177a50ce44fd348858e844 Author: Aldy Hernandez Date: Mon Oct 4 09:47:02 2021 +0200 Disallow loop rotation and loop header crossing in jump threaders. There is a lot of fall-out from this patch, as there were many threading tests that assumed the restrictions introduced by this patch were valid. Some tests have merely shifted the threading to after loop optimizations, but others ended up with no threading opportunities at all. Surprisingly some tests ended up with more total threads. It was a crapshoot all around. On a postive note, there are 6 tests that no longer XFAIL, and one guality test which now passes. I felt a bit queasy about such a fundamental change wrt threading, so I ran it through my callgrind test harness (.ii files from a bootstrap). There was no change in overall compilation, DOM, or the VRP threaders. However, there was a slight increase of 1.63% in the backward threader. I'm pretty sure we could reduce this if we incorporated the restrictions into their profitability code. This way we could stop the search when we ran into one of these restrictions. Not sure it's worth it at this point. Tested on x86-64 Linux. Co-authored-by: Richard Biener =