From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4A5953858D37; Fri, 3 Mar 2023 13:50:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4A5953858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677851454; bh=Re8yoRyPP6YeqWI/yhldceG4InUC5SoT9sGdUc+N5hc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Hok8rJGIKQEEbSH+uzkA4FKaq829WSTCdo8zL3IBb/uIc6yqbWbuIY6uLf1hJEonI N9qUBsvHscxyFVT+jVlC3iiFHxHjMlfbQeohYoKRtle7yRJ88osbz4ueKRyzDzLlpa fiQpA7PM1uARTYOFIEZVHoFXRouj940cBVWqoKiQ= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109008] [13 Regression] Wrong code in scipy package since r13-3926-gd4c2f1d376da6f Date: Fri, 03 Mar 2023 13:50:53 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 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=3D109008 --- Comment #11 from Richard Biener --- I think for the reverse op I'd naiively try to compute the result as we do = now and then extend the range by one ulp of the input range with the largest magnitude. Does real_nextafter (0.0) result in a denormal? For multiplication we have to consider underflow, say, if 0.0 =3D x * 1e-63; depending on whether we represent denormals in ranges x is the range where the operation underflows. As said we probably have to think and document what we do for individual operations. We can also conservatively widen the input ranges by one ulp, that's going to be always correct and maybe the best thing to do for GCC 13? It should be only necessary for the reverse operations.=