From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B34533858CDA; Sun, 28 May 2023 16:21:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B34533858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685290916; bh=7sxyZsmpNr6F/XZtPiJhL7ZewTHAEpwQPpeMrndaCK8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Msa4b71Dlx/WRzffa4FLHQWGqlL5MYcnNKx385vwUMrqrlzrAHPwmu/ICXwNrJPqL hk+/FgRtsjEGXv6csh84VxCATif8L0ltaPG1X4B7wWVPUlRp5cUOevZAa/a2z7FsYj ZbjftF6ECw2xBeABZ0ZGzQjDF/dlX3rJkDRh9oSY= From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBjLzExMDAwN10gSW1wbGVtZW50IHN1cHBvcnQgZm9yIENs?= =?UTF-8?B?YW5n4oCZcyBfX2J1aWx0aW5fdW5wcmVkaWN0YWJsZSgp?= Date: Sun, 28 May 2023 16:21:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka 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: cc 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=3D110007 Jan Hubicka changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #7 from Jan Hubicka --- Also note that branch predicted with 50% outcome is not necessarily unpredictable for example in this: for (int i =3D 0; i < 10000; i++) if (i&1) .... I would expect branch predictor to work this out on modern systems. So having explicit flag in branch_probability that given probability is hard for CPU to predict would make sense and I was thinking we may try to get th= is info from auto-fdo eventually too.=