From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 78E8E3858D28; Fri, 4 Feb 2022 18:14:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78E8E3858D28 From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBydGwtb3B0aW1pemF0aW9uLzEwNDM4N10gTmV3OiBhYXJj?= =?UTF-8?B?aDY0OiBSZWR1bmRhbnQgU1hUSCBmb3Ig4oCcYmFnIG9mIGJpdHPigJ0gbW92?= =?UTF-8?B?ZXM=?= Date: Fri, 04 Feb 2022 18:14:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rsandifo at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone cf_gcctarget Message-ID: 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: Fri, 04 Feb 2022 18:14:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104387 Bug ID: 104387 Summary: aarch64: Redundant SXTH for =E2=80=9Cbag of bits=E2=80= =9D moves Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rsandifo at gcc dot gnu.org Target Milestone: --- Target: aarch64*-*-* This PR is about another case in which we generate a redundant SXTH. Specifically: void f(short *x, short y) { x[0] =3D y; x[1] =3D y; } generates: sxth w1, w1 strh w1, [x0] strh w1, [x0, 2] even though the RTL makes it clear that the upper 16 bits of the promoted =E2=80=9Cy=E2=80=9D are unused. This is related to PR64537, but I think it's worth keeping as a separate PR since the fix isn't necessarily the same.=