From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 113C23858C2F; Tue, 23 Jan 2024 00:28:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 113C23858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705969737; bh=lBmxdbQyXKe5jxeVs7oRUyGB2abufSLUQ11peKG/hkQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QyGE6d56EWjYF+wJk6oYpS73D//7PuWCjr0/US/+MoTwNWI3LnB8bowW31BhXJIWQ gzVpLVMouGov313uWtVfj7DV/qTQZi0WSoUqFdxmoPnuodfZuIGzJEbdTLRK37iNtO i+xMZFOJ4irBv8vta1o3YyZR87VqvYpACkOR4hNY= From: "olegendo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/113533] [14 Regression] Code generation regression after change for pr111267 Date: Tue, 23 Jan 2024 00:28: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: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: olegendo 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: 14.0 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=3D113533 --- Comment #9 from Oleg Endo --- (In reply to Roger Sayle from comment #8) > Created attachment 57190 [details] > proposed patch >=20 > Proposed patch to provide a sane/saner set of rtx_costs for SH. There's > plenty more that could be done, but these changes are (more than) suffici= ent > to resolve the code quality regression caused by improved fwprop. If > someone could try this out on SH, and report back the results, that would= be > great. You've added differentiation for 'speed ?' in 'sh_address_cost'. Like this one. /* 'GBR + 0'. Account one more because of R0 restriction. */ if (REG_P (x) && REGNO (x) =3D=3D GBR_REG) - return 2; + return speed ? 2 : 0; What's the intention here? Why does the cost of the address computation reduced when not optimizing for speed? It distorts the address costs and m= akes them all equal.=