From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B143B3858D38; Sat, 5 Aug 2023 03:09:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B143B3858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691204995; bh=z59RHxCPeWv9smb90UvMzu2rf9LoR6h/39/vMElvt78=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hzhv9Iob5lJWWHhI/BfHxzywVNIv1QiAqC3JdSp+Pj/mlxaVjAF+wsOCHHQTmzR03 Sk4TEypaDidSWGh8eK/a5Mv5AOSZlQPU/ORDoGgVXgp86o5F6VNNmn3/icrtqTDSFo s1hQaWSdFwzC0Gg5kQQK/3TmFQZbww+ncxJdq2jo= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/20514] hoisting of label out of jumptable would take place at cse, should happen at trees Date: Sat, 05 Aug 2023 03:09:54 +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: 4.0.0 X-Bugzilla-Keywords: missed-optimization, TREE X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: law 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=3D20514 --- Comment #9 from Andrew Pinski --- in GCC 13+ we get now (for the testcase in comment #0) at -O3: ``` [local count: 452984831]: # i_lsm.4_2 =3D PHI if (i_lsm.4_2 =3D=3D 5) goto ; [25.00%] else goto ; [75.00%] [local count: 452984832]: goto ; [100.00%] ``` This is an infinite no matter which branch is taken ... Coming in we get either `3->4->4->5` or `3->4->5` no matter what we end up = in 5 always.=