From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DAB7A3858403; Wed, 9 Feb 2022 18:35:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DAB7A3858403 From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/24021] VRP does not work with floating points Date: Wed, 09 Feb 2022 18:35:31 +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.1.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: amacleod at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Feb 2022 18:35:32 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D24021 --- Comment #13 from Andrew Macleod --- > etc. which would be great if it could use frange. Though, I think we also > run here into the problem that match.pd right now avoids the ranger becau= se > it could reliably only allow walks from uses to SSA_NAME_DEF_STMTs and not > the other direction. That only happens with pointers and the non-null property right now, and ev= en that is going away to start GCC13. I have the prototype underway now. . > One thing to consider is that at runtime, not all arithmetics might be as > precise as what mpfr does at compile time, so in some cases it should exp= ect > a few ulps or maybe even more than that as possible errors (especially for > library functions). And also take into account different rounding modes = if > user wants that to be honored. >=20 We'll leave those to the experts :-) > As for exceptions, I guess one thing is that ranger computes ranges and > another thing is that optimization based on that will sometimes need to p= unt > if it could optimize away visible side-effects the user cares about. yeah, like with no-delete-null-pointer, there may be flag checking required= for some things.=