From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8E88C3892011; Sun, 2 May 2021 02:32:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E88C3892011 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100378] [9/10/11/12 Regression] arm64: lsl + asr used instead of sxth Date: Sun, 02 May 2021 02:32:07 +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: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on bug_status everconfirmed 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: Sun, 02 May 2021 02:32:07 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100378 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-05-02 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski --- Trying 2 -> 6: 2: r94:DI=3Dr96:DI REG_DEAD r96:DI 6: r95:SI=3Dsign_extend(r94:DI#0) REG_DEAD r94:DI Failed to match this instruction: (set (reg:SI 95 [ s ]) (ashiftrt:SI (subreg:SI (ashift:DI (reg:DI 96) (const_int 16 [0x10])) 0) (const_int 16 [0x10]))) So what is happening is now combine is inserting an extra mov from x0 to a = new register 96 and when it does the combine, it does it badly not into what it= was before: (insn 6 3 11 2 (set (reg:SI 95 [ s ]) (sign_extend:SI (subreg:HI (reg/v:DI 94 [ s ]) 0))) "t8877.c":6:37 = 111 {*extendhisi2_aarch64} (expr_list:REG_DEAD (reg/v:DI 94 [ s ]) (nil))) Confirmed. I thought there was a dup of this bug somewhere but I cannot fi= nd it.=