From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EFD7F3858D35; Sun, 5 Mar 2023 15:01:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFD7F3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678028515; bh=OFG4DQ9g9Ypu9P1R/CUHrpg3HFp/IEotzNp0evEbHPE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IHN3PYdUy2ESd6JblYf+P/nPv+1npYrgg6VYybql+FaFyzCdQjbnBiS59Gol4ycQq pcGrno4vVyc3pBnPpp+wawvFZ3sc9enU4IU83bxNxn50HOt1gGSxfCaLqa7PR1YwWh UhKM04GhnM9+5HjSAykux3mAvOlNXz/X6bkwM0pU= From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/109009] Shrink Wrap missed opportunity Date: Sun, 05 Mar 2023 15:01:55 +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: unknown X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jskumari at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D109009 --- Comment #4 from Segher Boessenkool --- Alternatively (or in addition), you can look how to make the shrink-wrap pa= ss transform the code with some simple added move instructions, maybe even involving an extra pseudo, so that it can shrink-wrap more. A very simple (and because of that, not very effective) version of that is done in prepare_shrink_wrapping already. The problem with this is that such transformations are not free: the extra insns can often be optimised away (just by register allocation), and even if not, if it causes more / better shrink-wrapping it is a win anyway. But it has to be done only if it improves shrink-wrapping (or it likely improves i= t), or it isn't a net win.=