From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 93FAB3857C40; Thu, 4 Nov 2021 18:47:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93FAB3857C40 From: "law at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102981] [12 Regression] Dead Code Elimination Regression at -O3 (trunk vs 11.2.0) Date: Thu, 04 Nov 2021 18:47:17 +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: law at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: priority 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: Thu, 04 Nov 2021 18:47:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102981 Jeffrey A. Law changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 --- Comment #4 from Jeffrey A. Law --- I have no strong opinions about this specific testcase. More generally I a= m in agreement with Zdenek and others that the threaders should not be peeling iterations off loops or rotating loops. Fundamentally the threaders don't have the kind of costing model to know if peeling an iteration off is profitable or not. So even after the loop optimizers are done, I'd still lean against peeling since if it was profita= ble it should have been done by the loop optimizer or vectorizer. So unless someone can show this is a significant issue in real world code, I would argue that it ought to be fixed by including the possibility of eliminating unreachable code int he profitibility analysis for loop peeling= by the loop optimizers and possibly the unroller (for this specific example).=