From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2806B3858C31; Thu, 16 Feb 2023 19:59:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2806B3858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676577550; bh=NQoboPiwAWSSgxqTlsZq8zTxFrzFBc++TBuL1wza8Yw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=v1LhDQL+9qogtgcjQ0xztMfy13PuzxHASO1dnKWPHocusN7se+asYFCTcQtMkP3xe BsTrXRSqP+AGdhZeoDVnGK2NYV4WEWUpmnTGd9tsbI17dr7QpxHQwZ8PuA4Tbwebh8 YSBB5AEl2aQz2NADa9NeAhZmJ+DU9L4deyJTG+tQ= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108803] [10/11/12/13 Regression] wrong code for 128bit rotate on aarch64-unknown-linux-gnu with -Og Date: Thu, 16 Feb 2023 19:59:09 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org 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: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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=3D108803 --- Comment #6 from Jakub Jelinek --- Created attachment 54476 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54476&action=3Dedit gcc13-pr108803.patch Actually, the above patch isn't correct because for op1 equal to 0 we really need the reverse_unsigned_shift to give 0 aka (outof_input >> 1) >> 63 rath= er than outof_input >> 0 aka outof_input. Anyway, with this patch we get same number of instructions as before on the= #c2 functions, the and unfortunately isn't optimized away because it has 2 uses rather than just one, but on the other side 63 - count needs 2 instructions while ~count only one.=