From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 833873950C79; Thu, 8 Jul 2021 17:16:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 833873950C79 From: "meissner at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/33699] [9/10/11/12 regression] missing optimization on const addr area store Date: Thu, 08 Jul 2021 17:16:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.3.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: meissner 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: 9.5 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 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, 08 Jul 2021 17:16:16 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D33699 Michael Meissner changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |meissner at gcc dot gnu.org --- Comment #32 from Michael Meissner --- I looked at adding the following powerpc patch that was proposed in March, 2021: https://gcc.gnu.org/pipermail/gcc-patches/2021-March/566744.html There are two parts to the patch, that are sort of unrelated. The first part is to add minimum and maximum section anchor offset values a= nd use -fsection anchors. I ran a spec 2017 benchmark on a pre-production pow= er10 system, comparing my normal run times to run times with -fsection-anchors a= nd setting the minimum/maximum section anchor offsets. Two benchmarks improved and two benchmarks regressed: xalancbmk_r: 1.75% regression cactuBSSN_r: 4.24% improvement blender_r: 1.92% regression roms_r: 1.05% improvement I then built spec 2017 with just the part of setting const_anchor, but not = the section anchor minimum/maximum offsets. Eight benchmarks did not build due= to assertion failures in cse.c: gcc_r exchange2_r cactuBSSN_r wrf_r blender_r cam4_r fotonik3d_r roms_r If I specify the section anchor minimum/maximum offsets, add -fsection-anch= ors, and set the const_anchor, all 23 INT+FP benchmarks build, but WRF_R does not run correctly. So without more debugging, I don't recommend setting const_anchor. It is probably useful to set the minimum/maximum section anc= hor offsets in case people use -fsection-anchors. As an aside, if we wanted to accept using constant addresses in the PowerPC= , we would need to recognize a constant address as being legitimate. This may be useful in some embedded environments where you have devices at certain memo= ry locations. But somebody would need to add the support.=