From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4EE743857716; Wed, 28 Jun 2023 09:16:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4EE743857716 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687943797; bh=jBiZ4LvuORsuxzzJo5rXtkASWo39RWbsWE5yXw47uHQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OF4aEjsuYUvKL9kQFOVeJNIboGcWs6XjdEcjx3pVZzslRhZNi+CotsN+fWaraICgD N4rF/nSHL5zVGL8oPzH6rQwhaBZTyw1MAs3XAm2xZTLYtb5cCJujG3Sz7otiuQGvsl nDuVWFEYiTiqOX858V7krDJ9qcsYKzH3mPw3/xkw= From: "hubicka 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 09:16:28 +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: hubicka 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: cf_reconfirmed_on bug_status everconfirmed 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 Jan Hubicka changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-06-28 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #7 from Jan Hubicka --- 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.=