From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A98473858D32; Wed, 15 Jun 2022 17:09:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A98473858D32 From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105991] New: rldicl+sldi+add generated instead of rldimi Date: Wed, 15 Jun 2022 17:09:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek 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 bug_severity priority component assigned_to reporter target_milestone 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: Wed, 15 Jun 2022 17:09:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105991 Bug ID: 105991 Summary: rldicl+sldi+add generated instead of rldimi Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- Starting with r12-2731-g96146e61cd7aee, this code (on ppc64le) unsigned long long foo (unsigned long long value) { value &=3D 0xffffffff; value |=3D value << 32; return value; } compiled with -O2 generates rldicl 9,3,0,32 sldi 3,3,32 add 3,3,9 blr while previously it was just rldimi 3,3,32,0 blr It doesn't look like a wrong code problem, but it seems more optimal to use rldimi (rotate left, mask insert) rather than rotate left by 0 bits, AND wi= th a mask, shift left, and add.=