From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0B8E7385DC0F; Tue, 7 Apr 2020 15:13:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B8E7385DC0F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586272434; bh=96YGWymKmxhZruXk3rBC3CNOV9UvEgTTyrIh/gl2k2s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bdgCugA3yiRoXusawvfCNAd9/rj7bnCK1KbSqdDcA4B74z3rTlgx/q+a8JlM/aQIw 5PtQRhrYXfUp+/Dj9+BsWdfFi/FXemaTlgCmyDDAfyhuMUJlI8vYREne2SiQtB5Bq2 O/Zcvjbb8wGsEC10VZVg4a8jrVlxu9VxPPS7LnHQ= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/94516] [10 Regression] gnutls test ./psk-file fails since r10-7515-g2c0fa3ecf70d199af18785702e9e0548fd3ab793 Date: Tue, 07 Apr 2020 15:13:53 +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: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.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 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: Tue, 07 Apr 2020 15:13:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94516 --- Comment #9 from Jakub Jelinek --- For the optimization issue, we could have a hack like: --- gcc/postreload.c.jj 2020-04-07 16:54:23.638924247 +0200 +++ gcc/postreload.c 2020-04-07 17:06:44.055964581 +0200 @@ -328,6 +328,17 @@ reload_cse_simplify_set (rtx set, rtx_in else continue; + /* Prefer stack pointer adjustment over copies from a register + that happens to hold the right value already (unless it is + much higher cost), because in the sp +=3D const case the + pass_stack_adjustments pass can merge it with other stack + adjustments. */ + if (SET_DEST (set) =3D=3D stack_pointer_rtx + && GET_CODE (SET_SRC (set)) =3D=3D PLUS + && XEXP (SET_SRC (set), 0) =3D=3D stack_pointer_rtx + && CONST_INT_P (XEXP (SET_SRC (set), 1))) + this_cost *=3D 4; + /* If equal costs, prefer registers over anything else. That tends to lead to smaller instructions on some machines. */ if (this_cost < old_cost Dunno... :( Or do such a change only if there are no following sp adjustments that coul= d be combined with it (e.g. remember we've done such a change, and when we proce= ss next stack pointer adjustment with no sp uses in between or what exactly csa does, and don't manage to optimize that one into sp =3D reg, try to undo the previous change.=