From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 21B153858C2C; Sat, 26 Aug 2023 16:43:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21B153858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693068206; bh=sjY4vOZBnX9VA9mKZv2AtqZhrxzRKsuQzZJSL1urGHc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=edc8rddSXy4rFQ6ARtNt3ZjdYoiM7x6aiVBuz1lOAJ1qWdYG9s0gDloWvy7OYSOz7 DgrRmy9dxjdjO9BPK3y17YEBxdZF3LlBoLZ5BgPuecuWyYUlKs9CYYf1C9FRwW0OGh wOmVdACh9xOKJVtKv3VEDLzhbQ/yh38lGOAXSkVg= From: "eggert at cs dot ucla.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/111143] [missed optimization] unlikely code slows down diffutils x86-64 ASCII processing Date: Sat, 26 Aug 2023 16:43:24 +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: 13.1.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: eggert at cs dot ucla.edu 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=3D111143 --- Comment #7 from Paul Eggert --- (In reply to Alexander Monakov from comment #6) > Are you binding the benchmark to some core in particular? I did the benchmark on performance cores, which was my original use case. On efficiency cores, adding the (unnecessary) 'mov eax, 1' doesn't change timi= ng much (0.9% speedup on one test). > it is better to have 'add rbx, 1' instead of 'add rbx, rax' in this loop = on any CPU Somewhat counterintuitively, that doesn't seem to be the case for the efficiency cores on this platform, as the "38% faster" code is 7% slower on E-cores. However, the use cases I'm concerned about are typically run on performance cores.=