From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0F2DF3858C78; Mon, 29 May 2023 16:17:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F2DF3858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685377034; bh=2rE3kJ4Kx0MPPUgNhX0xso0cAdA41tvVqQiP0L7GTcY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XlmmDC45JRgB19z5A3FG0XGkXS5P1oge3Ft+ksmHlwpHUHtyAItvWC4xPXHNn+D3k iWc70WioYUD5u8+br3hZebZU2SrdOARmAw5lPhYHdKm5afeBx1fkOOENOidAqax6DT 5BOn/Wi2VDW6jWGh84o71Wfds8FLvOAvULzBzitE= From: "roger at nextmovesoftware dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107812] [11/12/13/14 Regression] RTL SSA forwprop introduced regression since r11-6188 Date: Mon, 29 May 2023 16:17:13 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: roger at nextmovesoftware dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rsandifo at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107812 Roger Sayle changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |roger at nextmovesoftware = dot com --- Comment #3 from Roger Sayle --- Things are better but not perfect on trunk (GCC 14.0.0): pushl %esi pushl %ebx movl 16(%esp), %eax ; y movl 20(%esp), %ecx ; z movl 12(%esp), %edx ; x movl 4(%eax), %ebx ; y[1] movl (%eax), %esi ; y[0] movl %ebx, %eax shrdl %esi, %eax movl %eax, (%edx) popl %ebx popl %esi ret So the xorl and orl are gone, and we're down to two pushs/pops. It looks like the additional spill is just a difference in register allocat= ion. Perhaps i386.md's *concatsidi3_3 could be cleverer (to avoid the early clob= ber &r when both operands are mem, and their addressing mode is sufficently simple). i.e. movl (%eax), %esi ; y[0] movl 4(%eax), %eax ; y[1] instead of movl 4(%eax), %ebx ; y[1] movl (%eax), %esi ; y[0] movl %ebx, %eax=