From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E1E6C3858D37; Thu, 29 Jun 2023 12:41:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E1E6C3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688042480; bh=eyaZrcjfbhMswnD6I7dKzpj+nYsFca7m9wxAKxQ58Do=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OnjOaZyRVKL7acs2OTFSWHSYR3bMck4CT+uLukBCCvkuXV/Gn8Bw679/3Xv/j5SD2 NyTwlj8XDdGhxyW4jlgNnV258LKvlr4e+TyoPj/kwHqWERRTqNvgHmA5TuphIfSHeZ T/ZTG9R5e5NsMl60s9UqW4QUFSzGtw5ZUd8sk0Qs= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/110479] Unnecessary register move Date: Thu, 29 Jun 2023 12:41:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ubizjak at gmail dot com 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: 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=3D110479 --- Comment #1 from Uro=C5=A1 Bizjak --- (In reply to Thomas Koenig from comment #0) > movl %edi, %ecx This one? It is needed because SAL wants its count argument in %cl and first argument is passed in %edi (mandated by x86_64 ABI). With -mbmi2, one gets: shrl $10, %edi movl $1, %eax andl $3, %edi addl $3, %edi shlx %edi, %eax, %eax ret=