From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BE6F938582BE; Fri, 8 Dec 2023 11:01:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE6F938582BE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702033282; bh=/NvmT3xv1L6vK4SN4jLmCg7cWB4ThlEUDgDvzgc0ME8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ARkKzkDUbCnU7/3JpL6jKaEJDp5fzqriaTQeRdzrkYwBjEOQcndItqOvcxyb11fsN qwClsJH4RsujcaOjQuTWXYRCKXm2hrqpleH4ddm/Za/UynrU5YVC3aUlyW/ddhvAVl NMZqWp4JS+/1Bj2RKSTKvWUHyXXu6B1GruU4Pqh4= From: "guojiufu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/30271] -mstrict-align can an store extra for struct agrument passing Date: Fri, 08 Dec 2023 11:01:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.3.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: guojiufu at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: Kenneth.Zadeck at NaturalBridge dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D30271 Jiu Fu Guo changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |guojiufu at gcc dot gnu.org --- Comment #13 from Jiu Fu Guo --- (In reply to Andrew Pinski from comment #10) > (In reply to comment #9) > > Andrew,=20 > >=20 > > What is your point here? >=20 > My point here is that currently we do: > gi->frame_related =3D > (base =3D=3D frame_pointer_rtx) || (base =3D=3D hard_frame_pointe= r_rtx); >=20 > But if we change it to be: > gi->frame_related =3D > (base =3D=3D frame_pointer_rtx) || (base =3D=3D hard_frame_pointe= r_rtx) > || (base =3D=3D arg_pointer_rtx && fixed_regs[ARG_POINTER_REGNUM]= ); >=20 > It would delete the store (at least in a 4.3 based compiler).=20 > arg_pointer_rtx is the incoming argument space so if it is a fixed regist= er > it will be also frame related and we can safely delete the stores to this > space. https://gcc.gnu.org/pipermail/gcc-patches/2023-December/639550.html is using this idea too. And the 'std' in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D30271#c2 disappeared.=