From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0D6843858CDB; Wed, 10 Apr 2024 07:51:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D6843858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712735484; bh=As2sm5st1gkY+r5PVMxx2/3JuQexnPt57LgD16fIwdc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=k3hKPPFsmSw61hpTkL6djqTLiIvemNkEdTypUZ2sVSnAwGhOxRxf0dUBvR6KfdV39 j1cGbfnjiamUr2V1qwkC/fAgIHB6dG8LtsjvK/rJgWCV9QeM5myfXvqgWe4iY7z/te B6CjciE6nndsjGv1kmsJmjuyXjMiMndLRYULv9Z0= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114591] [12/13/14 Regression] register allocators introduce an extra load operation since gcc-12 Date: Wed, 10 Apr 2024 07:51:22 +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.2.0 X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com 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: 12.4 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=3D114591 --- Comment #3 from Uro=C5=A1 Bizjak --- (In reply to Jakub Jelinek from comment #2) > This changed with r12-5584-gca5667e867252db3c8642ee90f55427149cd92b6 Strange, if I revert the constraints to the previous setting with:=20 --cut here-- diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 10ae3113ae8..262dd25a8e0 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -2870,9 +2870,9 @@ (define_peephole2 (define_insn "*movhi_internal" [(set (match_operand:HI 0 "nonimmediate_operand" - "=3Dr,r,r,m ,*k,*k ,r ,m ,*k ,?r,?*v,*Yv,*v,*v,jm,m") + "=3Dr,r,r,m ,*k,*k ,*r ,*m ,*k ,?r,?v,*Yv,*v,*v,*jm,*m") (match_operand:HI 1 "general_operand" - "r ,n,m,rn,r ,*km,*k,*k,CBC,*v,r ,C ,*v,m ,*x,*v"))] + "r ,n,m,rn,*r ,*km,*k,*k,CBC,v,r ,C ,v,m ,x,v"))] "!(MEM_P (operands[0]) && MEM_P (operands[1])) && ix86_hardreg_mov_ok (operands[0], operands[1])" { --cut here-- I still get: movl v1(%rip), %eax # 6 [c=3D6 l=3D6] *zero_extendsidi2/3 movq %rax, v2(%rip) # 16 [c=3D4 l=3D7] *movdi_internal/5 movzwl v1(%rip), %eax # 7 [c=3D5 l=3D7] *movhi_internal/2=