From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2589E3858C54; Tue, 28 Mar 2023 09:01:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2589E3858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679994067; bh=sdKeNRtvJ7yXq6oeDP/QnJ+lb3NF1kK+JW5Tr6161Ho=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TWaFp9WjOkOD8NTfxACsJB0sFk0RgOLcOuC3lnH7pchEkGn6tFix4JGbqpGwBmnpk gJ4pHSZK5+LUYScvtY775mKA6oyLFCkRL5vEa8ACfShb43j/YiZDlU6mGHAtnVdiP6 fSCHuGJk8W6tjCbg0AX3wB+IBrvBNJbnb0QIibg0= From: "cvs-commit 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: Tue, 28 Mar 2023 09:01:06 +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: cvs-commit 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 #23 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:ce3974e5962b0e1f72a1f71ebda39d53a77b7cc9 commit r13-6898-gce3974e5962b0e1f72a1f71ebda39d53a77b7cc9 Author: Jakub Jelinek Date: Tue Mar 28 11:00:32 2023 +0200 range-op-float: Only flush_denormals_to_zero for +-*/ [PR109154] As discussed in the PR, flushing denormals to zero on every frange::set might be harmful for e.g. x < 0.0 comparisons, because we then on both sides use ranges that include zero [-Inf, -0.0] on the true side, and [-0.0, +Inf] NAN on the false side, rather than [-Inf, nextafter (-0.0, -Inf)] on the true side. The following patch does it only in range_operator_float::fold_range which is right now used for +-*/ (both normal and reverse ops of those). Though, I don't see any difference on the testcase in the PR, but not s= ure what I should be looking at and the reduced testcase there has undefined behavior. 2023-03-28 Jakub Jelinek PR tree-optimization/109154 * value-range.h (frange::flush_denormals_to_zero): Make it publ= ic rather than private. * value-range.cc (frange::set): Don't call flush_denormals_to_z= ero here. * range-op-float.cc (range_operator_float::fold_range): Call flush_denormals_to_zero.=