From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0D61E3858C52; Wed, 22 Mar 2023 14:40:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D61E3858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679496000; bh=VF2krYRvUoXF/NkS4LFySEpfWPVYzLU2BzPvSTMRlpE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PNN3gJKpubPh1Ojz9Uvp+KpwItXT+m32PF95uPzq7tHoYYyaVFm+IbxesagRNEp2+ 96VWDKJ4t9CLIGLt7qyXI8EkaMDtTsIuBQlez8y4qhRGISbCb53swbdeBwmVY8/e6U JvHYJaGia0cOBZ/Yg3n/1YvBMerusmeojpTN5keE= From: "aldyh 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 14:39:59 +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: aldyh 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 #10 from Aldy Hernandez --- (In reply to Andrew Macleod from comment #9) > (In reply to Richard Biener from comment #7) > > (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) BTW, I don't think it helps at all here, but casting from l_10 to a float, = we know _1 can't be either -0.0 or +-INF or +-NAN. We could add a range-op en= try for NOP_EXPR / CONVERT_EXPR to expose this fact. Well, at the very least t= hat it can't be a NAN...in the current representation for frange's.=