From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ADBB13854836; Wed, 22 Mar 2023 12:42:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ADBB13854836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679488958; bh=GF4pPbazM7qz6Csfbyehq2wNJh8rRq1b4Io+vcn62o0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=W2jJsZkF9YGtJ2zJCG2yx1gEinGIy3mjWZDk8GBoIY/Tm866qfJTMXRt0YfUOVUGh vn/Ls3pEXsm/XWSqrXNayqPrB1nHWXoWLNdug/UyjPRDuKoWf5Gr339NOG0nvthBKj Chf2Oqsk/Tfeyla0BpLtgtPfyWiqC+7QBdZjUhpE= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109154] [13 regression] jump threading de-optimizes nested floating point comparisons Date: Wed, 22 Mar 2023 12:42:38 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 13.0 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=3D109154 --- Comment #7 from Richard Biener --- (In reply to Richard Biener from comment #6) > ah, probably it's the missing CSE there: >=20 > : > _1 =3D (float) l_10; > _2 =3D _1 < 0.0; > zone1_17 =3D (int) _2; > if (_1 < 0.0) >=20 > we are not considering to replace the FP compare control if (_1 < 0.0) > with an integer compare control if (_2 !=3D 0). Maybe we should do that? Just to note it's forwprop which introudces the FP control stmt: _1 =3D (float) l_10; _2 =3D _1 < 0.0; zone1_17 =3D (int) _2; - zone1.1_18 =3D zone1_17; - if (zone1.1_18 !=3D 0) + if (_1 < 0.0) goto ; [INV] else goto ; [INV] : - iftmp.0_20 =3D zone1.1_18; : - # iftmp.0_11 =3D PHI + # iftmp.0_11 =3D PHI that makes the situation more difficult for VRP, I suppose that relations should still allow us to see zone1_17(4) is 1 on the edge 3->4? For value-numbering the situation is not easily resovable.=