From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 63B5B3858D39; Wed, 28 Jun 2023 16:47:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63B5B3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687970874; bh=5nxbImkbmkeaW/KviKm99WrkBkKJOkxi+9q0zwiDa3Q=; h=From:To:Subject:Date:In-Reply-To:References:From; b=i2jV0vDsNCEr2XWvISQY22fEivgHkv7Xp5e94ZCjcRjbKO3Urtheug0PMSkSXbx22 mDkaXVyYDMCwRVYduwSotd7a6YU5IxOQxpZnUU/nPpXeYkm72TMgV7UWW93VelsNAh JwjIvowa5CGpN4ElF2ny4DZlrlX2pBqCWwvXq6AM= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103680] Jump threading and switch corrupts profile Date: Wed, 28 Jun 2023 16:47:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: internal-improvement, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW 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: dependson 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=3D103680 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |25623 --- Comment #8 from Andrew Pinski --- (In reply to Jan Hubicka from comment #7) > a simple testcase: > test (int i) > { > if (__builtin_expect_with_probability (i > 5, 1, 0.6)) > foo (); > } > test2(int i) > { > test (i); > if (__builtin_expect_with_probability (i > 4, 1, 0.7)) > foo (); > } > this is can be updated quite easily, but we still fail. That is exactly bug 25623 comment #1. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D25623 [Bug 25623] jump threading/cfg cleanup messes up "incoming counts" for some= BBs=