From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9D2BC3858421; Tue, 5 Mar 2024 11:35:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D2BC3858421 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709638507; bh=E0ty0t8dt8ZGZgnsc7Dmo0gIaiZG7uQl9Syg1BwdnlM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KM81ofrlMMOU/taAfQQ5LekItQKZ0rkvqd9NI/TxX+seQg2/TW3Alz+Erak2nY9qZ IvuWuuZ1UBViwxYKz5AKomJXzudph4JGS5L2ZmMN08hmtKuu7jo9NI9nRjdXKMSPEc XZOO5hvyeaIb6lLBEyxWU/CECtpYgpsaz5GLzMUU= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/114211] [13 Regression] wrong code with -O -fno-tree-coalesce-vars since r13-1907 Date: Tue, 05 Mar 2024 11:35:05 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 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=3D114211 --- Comment #9 from Uro=C5=A1 Bizjak --- Noticed this in passing: --> movq %rcx, %rdx addq v(%rip), %rax adcq v+8(%rip), %rdx vmovq %rax, %xmm1 vpinsrq $1, %rdx, %xmm1, %xmm0 We could use %rcx instead of %rdx to eliminate the marked move. This is an artefact of post-reload split of *add3_doubleword. The _doubleword patterns use only general regs, so they could be split before reload as wel= l. IIRC, there were some minor RA problems with the later approach, but as yea= rs passed and LRA improved, perhaps the split point can be moved before reload. Something to try (again) for gcc-15. It is just the case of using ix86_pre_reload_split instead of reload_completed.=