From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E77DD3858D20; Sun, 20 Nov 2022 19:23:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E77DD3858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668972215; bh=tlfyh3XAbJl3MClgNg62t+F8cR1kcdJpi+pkjH/kapw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gFMcsaZxJDexOMqsbA7MKnvcJJn/6RkJqw/U/0xQTid4F4rLLCAYkKdes8cZE89zw mB8zIcPMeKcom29q/V2FqfqfiZXroJjRDaHqMfCYtbE9wleXREoQ49pJa5RX9bfPv4 /Koc9sCg4ba+ZrxZ6oX9r1qJw+s/hrNdSS3Z4u6o= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/107772] function prologue generated even though it's only needed in an unlikely path Date: Sun, 20 Nov 2022 19:23:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed bug_severity bug_status cf_reconfirmed_on 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=3D107772 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Severity|normal |enhancement Status|UNCONFIRMED |NEW Last reconfirmed| |2022-11-20 --- Comment #1 from Andrew Pinski --- Confirmed, though this is more than just the your normal shrink wrapping ca= se as you need to split the loop into two. Though maybe having the prologue and epoligue around the function call inst= ead might be better .... Anyways this is still a more complex case for shrink wrapping. I Noticed that LLVM does not even do a shrink wrapping for the early return= if b =3D=3D e on entering the function.=